home *** CD-ROM | disk | FTP | other *** search
/ Halting the Hacker - A P…uide to Computer Security / Halting the Hacker - A Practical Guide to Computer Security.iso / rfc / rfc1507.txt < prev    next >
Text File  |  1997-04-01  |  288KB  |  6,667 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         C. Kaufman
  8. Request for Comments: 1507                 Digital Equipment Corporation
  9.                                                           September 1993
  10.  
  11.  
  12.                                   DASS
  13.               Distributed Authentication Security Service
  14.  
  15. Status of this Memo
  16.  
  17.    This memo defines an Experimental Protocol for the Internet
  18.    community.  It does not specify an Internet standard.  Discussion and
  19.    suggestions for improvement are requested.  Please refer to the
  20.    current edition of the "Internet Official Protocol Standards" for the
  21.    standardization state and status of this protocol.  Distribution of
  22.    this memo is unlimited.
  23.  
  24. Table of Contents
  25.  
  26.     1.   Introduction ................................................ 2
  27.          1.1  What is DASS? .......................................... 2
  28.          1.2  Central Concepts ....................................... 4
  29.          1.3  What This Document Won't Tell You ..................... 11
  30.          1.4  The Relationship between DASS and ISO Standards ....... 17
  31.          1.5  An Authentication Walkthrough ......................... 20
  32.     2.   Services Used .............................................. 25
  33.          2.1  Time Service .......................................... 25
  34.          2.2  Random Numbers ........................................ 26
  35.          2.3  Naming Service ........................................ 26
  36.     3.   Services Provided .......................................... 37
  37.          3.1  Certificate Contents .................................. 38
  38.          3.2  Encrypted Private Key Structure ....................... 40
  39.          3.3  Authentication Tokens ................................. 40
  40.          3.4  Credentials ........................................... 43
  41.          3.5  CA State .............................................. 47
  42.          3.6  Data types used in the routines ....................... 47
  43.          3.7  Error conditions ...................................... 49
  44.          3.8  Certificate Maintenance Functions ..................... 49
  45.          3.9  Credential Maintenance Functions ...................... 55
  46.          3.10 Authentication Procedures ............................. 63
  47.          3.11 DASSlessness Determination Functions .................. 87
  48.     4.   Certificate and message formats ............................ 89
  49.          4.1  ASN.1 encodings ....................................... 89
  50.          4.2  Encoding Rules ........................................ 96
  51.          4.3  Version numbers and forward compatibility ............. 96
  52.          4.4  Cryptographic Encodings ............................... 97
  53.     Annex A - Typical Usage ........................................ 101
  54.          A.1  Creating a CA ........................................ 101
  55.  
  56.  
  57.  
  58. Kaufman                                                         [Page 1]
  59.  
  60. RFC 1507                          DASS                    September 1993
  61.  
  62.  
  63.          A.2  Creating a User Principal ............................ 102
  64.          A.3  Creating a Server Principal .......................... 103
  65.          A.4  Booting a Server Principal ........................... 103
  66.          A.5  A user logs on to the network ........................ 103
  67.          A.6  An Rlogin (TCP/IP) connection is made ................ 104
  68.          A.7  A Transport-Independent Connection ................... 104
  69.     Annex B - Support of the GSSAPI ................................ 104
  70.          B.1  Summary of GSSAPI .................................... 105
  71.          B.2  Implementation of GSSAPI over DASS ................... 106
  72.          B.3  Syntax ............................................... 110
  73.     Annex C - Imported ASN.1 definitions ........................... 112
  74.     Glossary ....................................................... 114
  75.    Security Considerations ......................................... 119
  76.    Author's Address ................................................ 119
  77.    Figures
  78.     Figure 1 - Authentication Exchange Overview ....................  24
  79.  
  80. 1. Introduction
  81.  
  82. 1.1 What is DASS?
  83.  
  84.    Authentication is a security service. The goal of authentication is
  85.    to reliably learn the name of the originator of a message or request.
  86.    The classic way by which people authenticate to computers (and by
  87.    which computers authenticate to one another) is by supplying a
  88.    password.  There are a number of problems with existing password
  89.    based schemes which DASS attempts to solve.  The goal of DASS is to
  90.    provide authentication services in a distributed environment which
  91.    are both more secure (more difficult for a bad guy to impersonate a
  92.    good guy) and easier to use than existing mechanisms.
  93.  
  94.    In a distributed environment, authentication is particularly
  95.    challenging.  Users do not simply log on to one machine and use
  96.    resources there.  Users start processes on one machine which may
  97.    request services on another.  In some cases, the second system must
  98.    request services from a third system on behalf of the user.  Further,
  99.    given current network technology, it is fairly easy to eavesdrop on
  100.    conversations between computers and pick up any passwords that might
  101.    be going by.
  102.  
  103.    DASS uses cryptographic mechanisms to provide "strong, mutual"
  104.    authentication.  Mutual authentication means that the two parties
  105.    communicating each reliably learn the name of the other.  Strong
  106.    authentication means that in the exchange neither obtains any
  107.    information that it could use to impersonate the other to a third
  108.    party.  This can't be done with passwords alone.  Mutual
  109.    authentication can be done with passwords by having a "sign" and a
  110.    "counter-sign" which the two parties must utter to assure one another
  111.  
  112.  
  113.  
  114. Kaufman                                                         [Page 2]
  115.  
  116. RFC 1507                          DASS                    September 1993
  117.  
  118.  
  119.    of their identities.  But whichever party speaks first reveals
  120.    information which can be used by the second (unauthenticated) party
  121.    to impersonate it.  Longer sequences (often seen in spy movies)
  122.    cannot solve the problem in general.  Further, anyone who can
  123.    eavesdrop on the conversation can impersonate either party in a
  124.    subsequent conversation (unless passwords are only good once).
  125.    Cryptography provides a means whereby one can prove knowledge of a
  126.    secret without revealing it.  People cannot execute cryptographic
  127.    algorithms in their heads, and thus cannot strongly authenticate to
  128.    computers directly.  DASS lays the groundwork for "smart cards":
  129.    microcomputers sealed in credit cards which when activated by a PIN
  130.    will strongly authenticate to a computer.  Until smart cards are
  131.    available, the first link from a user to a DASS node remains
  132.    vulnerable to eavesdropping.  DASS mechanisms are constructed so that
  133.    after the initial authentication, smart card or password based
  134.    authentication looks the same.
  135.  
  136.    Today, systems are constructed to think of user identities in terms
  137.    of accounts on individual computers.  If I have accounts on ten
  138.    machines, there is no way a priori to see that those ten accounts all
  139.    belong to the same individual.  If I want to be able to access a
  140.    resource through any of the ten machines, I must tell the resource
  141.    about all ten accounts.  I must also tell the resource when I get an
  142.    eleventh account.
  143.  
  144.    DASS supports the concept of global identity and network login.  A
  145.    user is assigned a name from a global namespace and that name will be
  146.    recognized by any node in the network.  (In some cases, a resource
  147.    may be configured as accessible only by a particular user acting
  148.    through a particular node.  That is an access control decision, and
  149.    it is supported by DASS, but the user is still known by his global
  150.    identity).  From a practical point of view, this means that a user
  151.    can have a single password (or smart card) which can be used on all
  152.    systems which allow him access and access control mechanisms can
  153.    conveniently give access to a user through any computer the user
  154.    happens to be logged into.  Because a single user secret is good on
  155.    all systems, it should never be necessary for a user to enter a
  156.    password other than at initial login.  Because cryptographic
  157.    mechanisms are used, the password should never appear on the network
  158.    beyond the initial login node.
  159.  
  160.    DASS was designed as a component of the Distributed System Security
  161.    Architecture (DSSA) (see "The Digital Distributed System Security
  162.    Architecture" by M. Gasser, A. Goldstein, C. Kaufman, and B. Lampson,
  163.    1989 National Computer Security Conference).  It is a goal of DSSA
  164.    that access control on all systems be based on users' global names
  165.    and the concept of "accounts" on computers eventually be replaced
  166.    with unnamed rights to execute processes on those computers.  Until
  167.  
  168.  
  169.  
  170. Kaufman                                                         [Page 3]
  171.  
  172. RFC 1507                          DASS                    September 1993
  173.  
  174.  
  175.    this happens, computers will continue to support the concept of
  176.    "local accounts" and access controls on resources on those systems
  177.    will still be based on those accounts.  There is today within the
  178.    Berkeley rtools running over the Internet Protocol suite the concept
  179.    of a ".rhosts database" which gives access to local accounts from
  180.    remote accounts.  We envision that those databases will be extended
  181.    to support granting access to local accounts based on DASS global
  182.    names as a bridge between the past and the future.  DASS should
  183.    greatly simplify the administration of those databases for the
  184.    (presumably common) case where a user should be granted access to an
  185.    account ignoring his choice of intermediate systems.
  186.  
  187. 1.2 Central Concepts
  188.  
  189. 1.2.1 Strong Authentication with Public Keys
  190.  
  191.    DASS makes heavy use of the RSA Public Key cryptosystem.  The
  192.    important properties of the RSA algorithms for purposes of this
  193.    discussion are:
  194.  
  195.     - It supports the creation of a public/private key pair, where
  196.       operations with one key of the pair reverse the operations of
  197.       the other, but it is computationally infeasible to derive the
  198.       private key from the public key.
  199.  
  200.     - It supports the "signing" of a message with the private key,
  201.       after which anyone knowing the public key can "verify" the
  202.       signature and know that it was constructed with knowledge of
  203.       the private key and that the message was not subsequently
  204.       altered.
  205.  
  206.     - It supports the "enciphering" of a message by anyone knowing
  207.       the public key such that only someone with knowledge of the
  208.       private key can recover the message.
  209.  
  210.    With access to the RSA algorithms, it is easy to see how one could
  211.    construct a "strong" authentication mechanism.  Each "principal"
  212.    (user or computer) would construct a public/private key pair, publish
  213.    the public key, and keep secret the private key.  To authenticate to
  214.    you, I would write a message, sign it with my private key, and send
  215.    it to you.  You would verify the message using my public key and know
  216.    the message came from me.  If mutual authentication were desired, you
  217.    could create an acknowledgment and sign it with your private key; I
  218.    could verify it with your public key and I would know you received my
  219.    message.
  220.  
  221.    The authentication algorithms used by DASS are considerably more
  222.    complex than those described in the paragraph above in order to deal
  223.  
  224.  
  225.  
  226. Kaufman                                                         [Page 4]
  227.  
  228. RFC 1507                          DASS                    September 1993
  229.  
  230.  
  231.    with a large number of practical concerns including subtle security
  232.    threats.  Some of these are discussed below.
  233.  
  234. 1.2.2 Timestamps vs. Challenge/Response
  235.  
  236.    Cryptosystems give you the ability to sign messages so that the
  237.    receiver has assurance that the signer of the message knew some
  238.    cryptographic secret.  Free-standing public key based authentication
  239.    is sufficiently expensive that it is unlikely that anyone would want
  240.    to sign every message of an interactive communication, and even if
  241.    they did they would still face the threat of someone rearranging the
  242.    messages or playing them multiple times.  Authentication generally
  243.    takes place in the context of establishing some sort of "connection,"
  244.    where a conversation will ensue under the auspices of the single
  245.    peer-entity authentication.  This connection might be
  246.    cryptographically protected against modification or reordering of the
  247.    messages, but any such protection would be largely independent of the
  248.    authentication which occurred at the start of the connection.  DASS
  249.    provides as a side effect of authentication the provision of a shared
  250.    key which may be used for this purpose.
  251.  
  252.    If in our simple minded authentication above, I signed the message
  253.    "It's really me!" with my private key and sent it to you, you could
  254.    verify the signature and know the message came from me and give the
  255.    connection in which this message arrived access to my resources.
  256.    Anyone watching this message over the network, however, could replay
  257.    it to any server (just like a password!) and impersonate me.  It is
  258.    important that the message I send you only be accepted by you and
  259.    only once.  I can prevent the message from being useful at any other
  260.    server by including your name in the message.  You will only accept
  261.    the message if you see your name in it.  Keeping you from accepting
  262.    the message twice is harder.
  263.  
  264.    There are two "standard" ways of providing this replay protection.
  265.    One is called challenge/response and the other is called timestamp-
  266.    based.  In a challenge response type scheme, I tell you I want to
  267.    authenticate, you generate a "challenge" (generally a number), and I
  268.    include the challenge in the message I sign.  You will only accept a
  269.    message if it contains the recently generated challenge and you will
  270.    make sure you never issue the same challenge to me twice (either by
  271.    using a sequence number, a timestamp, or a random number big enough
  272.    that the probability of a duplicate is negligible).  In the
  273.    timestamp-based scheme, I include the current time in my message.
  274.    You have a rule that you will not accept messages more than - say -
  275.    five minutes old and you keep track of all messages you've seen in
  276.    the last five minutes.  If someone replays the message within five
  277.    minutes, you will reject it because you will remember you've seen it
  278.    before; if someone replays it after five minutes, you will reject it
  279.  
  280.  
  281.  
  282. Kaufman                                                         [Page 5]
  283.  
  284. RFC 1507                          DASS                    September 1993
  285.  
  286.  
  287.    as timed out.
  288.  
  289.    The disadvantage of the challenge/response based scheme is that it
  290.    requires extra messages.  While one-way authentication could
  291.    otherwise be done with a single message and mutual authentication
  292.    with one message in each direction, the challenge/response scheme
  293.    always requires at least three messages.
  294.  
  295.    The disadvantage of the timestamp-based scheme is that it requires
  296.    secure synchronized time.  If our clocks drift apart by more than
  297.    five minutes, you will reject all of my attempts to authenticate.  If
  298.    a network time service spoofer can convince you to turn back your
  299.    clock and then subsequently replays an expired message, you will
  300.    accept it again.  The multicast nature of existing distributed time
  301.    services and the likelihood of detection make this an unlikely
  302.    threat, but it must be considered in any analysis of the security of
  303.    the scheme.  The timestamp scheme also requires the server to keep
  304.    state about all messages seen in the clock skew interval.  To be
  305.    secure, this must be kept on stable storage (unless rebooting takes
  306.    longer than the permitted clock skew interval).
  307.  
  308.    DASS uses the timestamp-based scheme.  The primary motivations behind
  309.    this decision were so that authentication messages could be
  310.    "piggybacked" on existing connection establishment messages and so
  311.    that DASS would fit within the same "form factor" (number and
  312.    direction of messages) as Kerberos.
  313.  
  314. 1.2.3 Delegation
  315.  
  316.    In a distributed environment, authentication alone is not enough.
  317.    When I log onto a computer, not only do I want to prove my identity
  318.    to that computer, I want to use that computer to access network
  319.    resources (e.g., file systems, database systems) on my behalf.  My
  320.    files should (normally) be protected so that I can access them
  321.    through any node I log in through.  DASS allows them to be so
  322.    protected without allowing all of the systems that I might ever use
  323.    to access those files in my absence.  In the process of logging in,
  324.    my password gives my login node access to my RSA secret.  It can use
  325.    that secret to "impersonate" me on any requests it makes on my
  326.    behalf.  It should forget all secrets associated with me when I log
  327.    off.  This limits the trust placed in computer systems.  If someone
  328.    takes control of a computer, they can impersonate all people who use
  329.    that computer after it is taken over but no others.
  330.  
  331.    Normally when I access a network service, I want to strongly
  332.    authenticate to it.  That is, I want to prove my identity to that
  333.    service, but I don't want to allow that service to learn anything
  334.    that would allow it to impersonate me.  This allows me to use a
  335.  
  336.  
  337.  
  338. Kaufman                                                         [Page 6]
  339.  
  340. RFC 1507                          DASS                    September 1993
  341.  
  342.  
  343.    service without trusting it for more than the service it is
  344.    delivering.  When using some services, for example remote login
  345.    services, I may want that service to act on my behalf in calling
  346.    additional services.  DASS provides a mechanism whereby I can pass
  347.    secrets to such services that allow them to impersonate me.
  348.  
  349.    Future versions of this architecture may allow "limited delegation"
  350.    so that a user may delegate to a server only those rights the server
  351.    needs to carry out the user's wishes.  This version  can limit
  352.    delegation only in terms of time.  The information a user gives a
  353.    server (other than the initial login node) can be used to impersonate
  354.    the user but only for a limited period of time.  Smart cards will
  355.    permit that time limitation to apply to the initial login node as
  356.    well.
  357.  
  358. 1.2.4 Certification Authorities
  359.  
  360.    A flaw in the strong authentication mechanism described above is that
  361.    it assumes that every "principal" (user and node) knows the public
  362.    key of every other principal it wants to authenticate.  If I can fool
  363.    a server into thinking my public key is actually your public key, I
  364.    can impersonate you by signing a message, saying it is from you, and
  365.    having the server verify the message with what it thinks is your
  366.    public key.
  367.  
  368.    To avoid the need to securely install the public key of every
  369.    principal in the database of every other principal, the concept of a
  370.    "Certification Authority" was invented.  A certification authority is
  371.    a principal trusted to act as an introduction service.  Each
  372.    principal goes to the certification authority, presents its public
  373.    key, and proves it has a particular name (the exact mechanisms for
  374.    this vary with the type of principal and the level of security to be
  375.    provided).  The CA then creates a "certificate" which is a message
  376.    containing the name and public key of the principal, an expiration
  377.    date, and bookkeeping information signed by the CA's private key.
  378.    All "subscribers" to a particular CA can then be authenticated to one
  379.    another by presenting their certificates and proving knowledge of the
  380.    corresponding secret.  CAs need only act when new principals are
  381.    being named and new private keys created, so that can be maintained
  382.    under tight physical security.
  383.  
  384.    The two problems with the scheme as described so far are "revocation"
  385.    and "scaleability".
  386.  
  387. 1.2.4.1 Certificate Revocation
  388.  
  389.    Revocation is the process of announcing that a key has (or may have)
  390.    fallen into the wrong hands and should no longer be accepted as proof
  391.  
  392.  
  393.  
  394. Kaufman                                                         [Page 7]
  395.  
  396. RFC 1507                          DASS                    September 1993
  397.  
  398.  
  399.    of some particular identity.  With certificates as described above,
  400.    someone who learns your secret and your certificate can impersonate
  401.    you indefinitely - even after you have learned of the compromise.  It
  402.    lacks the ability corresponding to changing your password.  DASS
  403.    supports two independent mechanisms for revoking certificates. In the
  404.    future, a third may be added.
  405.  
  406.    One method for revocation is using timeouts and renewals of
  407.    certificates.  Part of the signed message which is a certificate may
  408.    be a time after which the certificate should not be believed.
  409.    Periodically, the CA would renew certificates by signing one with a
  410.    later timeout.  If a key were compromised, a new key would be
  411.    generated and a new certificate signed.  The old certificate would
  412.    only be valid until its timeout.  Timeouts are not perfect revocation
  413.    mechanisms because they provide only slow revocation (timeouts are
  414.    typically measured in months for the load on the CA and communication
  415.    with users to be kept manageable) and they depend on servers having
  416.    an accurate source of the current time.  Someone who can trick a
  417.    server into turning back its clock can use expired certificates.
  418.  
  419.    The second method is by listing all non-revoked certificates in the
  420.    naming service and believing only certificates found there.  The
  421.    advantage of this method is that it is almost immediate (the only
  422.    delay is for name service "skulking" and caching delays).  The
  423.    disadvantages are: (1) the availability of authentication is only as
  424.    good as the availability of the naming service and (2) the security
  425.    of revocation is only as good as the security of the naming service.
  426.  
  427.    A third method for revocation - not currently supported by DASS - is
  428.    for certification authorities to periodically issue "revocation
  429.    lists" which list certificates which should no longer be accepted.
  430.  
  431. 1.2.4.2 Certification Authority Hierarchy
  432.  
  433.    While using a certification authority as an introduction service
  434.    scales much better than having every principal learn the public key
  435.    of every other principal by some out of band means, it has the
  436.    problem that it creates a central point of trust.  The certification
  437.    authority can impersonate any principal by inventing a new key and
  438.    creating a certificate stating that the new key represents the
  439.    principal.  In a large organization, there may be no individual who
  440.    is sufficiently trusted to operate the CA.  Even if there were, in a
  441.    large organization it would be impractical to have every individual
  442.    authenticate to that single person.  Replicating the CA solves the
  443.    availability problem but makes the trust problem worse.  When
  444.    authentication is to be used in a global context - between companies
  445.    - the concept of a single CA is untenable.
  446.  
  447.  
  448.  
  449.  
  450. Kaufman                                                         [Page 8]
  451.  
  452. RFC 1507                          DASS                    September 1993
  453.  
  454.  
  455.    DASS addresses this problem by creating a hierarchy of CAs.  The CA
  456.    hierarchy is tied to the naming hierarchy.  For each directory in the
  457.    namespace, there is a single CA responsible for certifying the public
  458.    keys of its members.  That CA will also certify the public keys of
  459.    the CAs of all child directories and of the CA of the parent
  460.    directory.  With this cross-certification, it is possible knowing the
  461.    public key of any CA to verify the public keys of a series of
  462.    intermediate CAs and finally to verify the public key of any
  463.    principal.
  464.  
  465.    Because the CA hierarchy is tied to the naming hierarchy, the trust
  466.    placed in any individual CA is limited.  If a CA is compromised, it
  467.    can impersonate any of the principals listed in its directory, but it
  468.    cannot impersonate arbitrary principals.
  469.  
  470.    DASS provides mechanisms for every principal to know the public key
  471.    of its "parent" CA - the CA controlling the directory in which it is
  472.    named.  The result is the following rules for the implications of a
  473.    compromised CA:
  474.  
  475.     a) A CA can impersonate any principal named in its directory.
  476.  
  477.     b) A CA can impersonate any principal to a server named in its
  478.        directory.
  479.  
  480.     c) A CA can impersonate any principal named in a subdirectory to
  481.        any server not named in the same subdirectory.
  482.  
  483.     d) A CA can impersonate to any server in a subdirectory any
  484.        principal not named in the same subdirectory.
  485.  
  486.    The implication is that a compromise low in the naming tree will
  487.    compromise all principals below that directory while a compromise
  488.    high in the naming tree will compromise only the authentication of
  489.    principals far apart in the naming hierarchy.  In particular, when
  490.    multiple organizations share a namespace (as they do in the case of
  491.    X.500), the compromise of a CA in one organization can not result in
  492.    false authentication within another organization.
  493.  
  494.    DASS uses the X.500 directory hierarchy for principal naming.  At the
  495.    top of the hierarchy are names of countries.  National authorities
  496.    are not expected to establish certification authorities (at least
  497.    initially), so an alternative mechanism must be used to authenticate
  498.    entities "distant" in the naming hierarchy.  The mechanism for this
  499.    in DASS is the "cross-certificate" where a CA certifies the public
  500.    key for some CA or principal not its parent or child.  By limiting
  501.    the chains of certificates they will use to parent certificates
  502.    followed by a single "cross certificate" followed by child
  503.  
  504.  
  505.  
  506. Kaufman                                                         [Page 9]
  507.  
  508. RFC 1507                          DASS                    September 1993
  509.  
  510.  
  511.    certificates, a DASS implementation can avoid the need to have CAs
  512.    near the root of the tree or can avoid the requirement to trust them
  513.    even if they do exist.  A special case can also be supported whereby
  514.    a global authority whose name is not the root can certify the local
  515.    roots of independent "islands".
  516.  
  517. 1.2.5 User vs. Node Authentication
  518.  
  519.    In concept, DASS mechanisms support the mutual authentication of two
  520.    principals regardless of whether those principals are people,
  521.    computers, or applications.  Those mechanisms have been extended,
  522.    however, to deal with a common case of a pair of principals acting
  523.    together (a user and a node) authenticating to a single principal (a
  524.    remote server).  This is done by having optionally in each
  525.    credentials structure two sets of secrets - one for the user and one
  526.    for the node.  When authentication is done using such credentials,
  527.    both secrets sign the request so the receiving party can verify that
  528.    both principals are present.
  529.  
  530.    This setup has a number of advantages.  It permits access controls to
  531.    be enforced based on both the identity of the user and the identity
  532.    of the originating node.  It also makes it possible to define users
  533.    of systems who have no network wide identities who can access network
  534.    resources on the basis of node credentials alone.  The security of
  535.    such a setup is less because a node can impersonate all of its users
  536.    even when they are not logged in, but it offers an easier transition
  537.    from existing global identities for all users.
  538.  
  539. 1.2.6 Protection of User Keys
  540.  
  541.    DASS mechanisms generally deal with authentication between principals
  542.    each knowing a private key.  For principals who are people, special
  543.    mechanisms are provided for maintaining that private key.  In
  544.    particular, it many cases it will be most convenient to keep
  545.    passwords as secrets rather than private keys.  This architecture
  546.    specifies a means of storing private keys encrypted under passwords.
  547.    This would provide security as good as hiding a private key were it
  548.    not that people tend to choose passwords from a small space (like
  549.    words in a dictionary) such that a password can be more easily
  550.    guessed than a private key.  To address this potential weakness, DASS
  551.    specifies a protocol between a login node and a login agent whereby
  552.    the login agent can audit and limit the rate of password guesses.
  553.    Use of these features is optional.  A user with a smart card could
  554.    store a private key directly and bypass all of these mechanisms.  If
  555.    users can be forced to choose "good" passwords, the login agent could
  556.    be eliminated and encrypted credentials could be stored directly in
  557.    the naming service.
  558.  
  559.  
  560.  
  561.  
  562. Kaufman                                                        [Page 10]
  563.  
  564. RFC 1507                          DASS                    September 1993
  565.  
  566.  
  567.    Another way in which user keys are protected is that the architecture
  568.    does not require that they be available except briefly at login.
  569.    This reduces the threat of a user walking away from a logged on
  570.    workstation and having someone take over the workstation and extract
  571.    his key.  It also makes the use of RSA based smart cards practical;
  572.    the card could keep the user's private key and execute one signature
  573.    operation at login time to authenticate an entire session.
  574.  
  575. 1.3 What This Document Won't Tell You
  576.  
  577.    Architecture documents are by their nature difficult to read.  This
  578.    one is no exception. The reason is that an architecture document
  579.    contains the details sufficient to build interoperable
  580.    implementations, but it is not a design specification. It goes out of
  581.    its way to leave out any details which an implementation could choose
  582.    without affecting interoperability. It also does not specify all the
  583.    uses of the services provided because these services are properly
  584.    regarded as general purpose tools.
  585.  
  586.    The remainder of this section includes information which is not
  587.    properly part of the authentication architecture, but which may be
  588.    useful in understanding why the architecture is the way it is.
  589.  
  590. 1.3.1 How DASS is Embedded in an Operating System
  591.  
  592.    While architecturally DASS does not require any operating system
  593.    support in order to be used by an application (other than the
  594.    services listed in Section 2), it is expected that actual
  595.    implementations of DASS will be closely tied to the operating systems
  596.    of host computers.  This is done both for security and for
  597.    convenience.
  598.  
  599.    In particular, it is expected that when a user logs into a node, a
  600.    set of credentials will be created for that user and then associated
  601.    by the operating system with all processes initiated by or on behalf
  602.    of the user.  When a user delegates to a service, the remote
  603.    operating system is expected to accept the delegation and start up
  604.    the remote process with the delegated credentials.  Most nodes are
  605.    expected to have credentials of their own and support the concept of
  606.    user accounts.  When user credentials are created, the node is
  607.    expected to verify them in its own context, determine the appropriate
  608.    user account, and add node credentials to the created credentials
  609.    set.
  610.  
  611. 1.3.2 Forms of Credentials
  612.  
  613.    In the DASS architecture, there is a single data structure called
  614.    "Credentials" with a large number of optional parts.  In an
  615.  
  616.  
  617.  
  618. Kaufman                                                        [Page 11]
  619.  
  620. RFC 1507                          DASS                    September 1993
  621.  
  622.  
  623.    implementation, it is possible that not all of the architecturally
  624.    allowed subsets will be supported and credentials structures with
  625.    different subsets of the data may be implemented quite differently.
  626.  
  627.    The major categories of credentials likely to be supported in an
  628.    implementation are:
  629.  
  630.     - Claimant credentials  - these are the credentials which would
  631.       normally be associated with a user process in order that it be
  632.       able to create authentication tokens.  It would contain the
  633.       user's name, login ticket, session private key, and (at least
  634.       logically) local node credentials and cached outgoing
  635.       contexts.
  636.  
  637.     - Verifier credentials -  these are the credentials which would
  638.       normally be associated with a server which must verify tokens
  639.       and produce mutual authentication response tokens.  Since
  640.       servers may be started by a node on demand, some
  641.       representation of verifier credentials must exist independent
  642.       of a process.  If an operating system wishes to authenticate a
  643.       request before starting a server process, the credentials must
  644.       exist in usable form.  An implementation may choose to have
  645.       all services on a "node" share a verifier credentials
  646.       structure, or it may choose to have each service have its own.
  647.  
  648.     - Combined credentials - architecturally, a server may have a
  649.       structure which is both claimant credentials and verifier
  650.       credentials combined so that the server may act in either role
  651.       using a single structure.  There is some overlap in the
  652.       contents.  There is no requirement, however, that an
  653.       implementation support such a structure.
  654.  
  655.     - Stub credentials - In the architecture, a credentials
  656.       structure is created whenever a token is accepted.  If delegation
  657.       took place, these are claimant credentials usable by their
  658.       possessor to create additional tokens.  If no delegation took
  659.       place, this structure exists as an architectural place holder
  660.       against which an implementation may attempt to authenticate
  661.       user and node names.  An implementation might choose to
  662.       implement  stub credentials  with a different mechanism than
  663.       claimant or verifier credentials.  In particular, it might do
  664.       whatever user and node authentication is useful itself and not
  665.       support this structure at all.
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Kaufman                                                        [Page 12]
  675.  
  676. RFC 1507                          DASS                    September 1993
  677.  
  678.  
  679. 1.3.3 Support for Alternative Certification Authority
  680.       Implementations
  681.  
  682.    A motivating factor in much of the design of DASS is the need to
  683.    protect certification authorities from compromise. CAs are only used
  684.    to create certificates for new principals and to renew them on
  685.    expiration (expiration intervals are likely to be measured in
  686.    months). They therefore do not need to be highly available. For
  687.    maximum security, CAs could be implemented on standalone PCs where
  688.    the hardware, software, and keys can be locked in a safe when the CA
  689.    is not in use. The certificates the CA generates must be delivered to
  690.    the naming service to be registered, and a possible mechanism for
  691.    this is for the CA to have an RS232 line to an on-line component
  692.    which can pass certificates and related information but not login
  693.    sessions. The intent would be to make it implausible to mount a
  694.    network attack against the CA.  Alternatively, certificates could be
  695.    carried to the network on a floppy disk.
  696.  
  697.    For CAs to be secure, a whole host of design details must be done
  698.    right. The most important of these is the design of user and system
  699.    manager interfaces that make it difficult to "trick" a user or system
  700.    manager into doing the wrong thing and certifying an impostor or
  701.    revealing a key. Mechanisms for generating keys must also be
  702.    carefully protected to assure that the generated key cannot be
  703.    guessed (because of lack of randomness) and is not recorded where a
  704.    penetrator can get it. Because a certificate contains relatively
  705.    little human intelligible information (its most important components
  706.    are UIDs and public keys), it will be a challenge to design a user
  707.    interface that assures the human operator only authorizes the signing
  708.    of intented certificates. Such considerations are beyond the scope of
  709.    the architecture (since they do not affect interoperability), but
  710.    they did affect the design in subtle ways.  In particular, it does
  711.    not assume uniform security throughout the CA hierarchy and is
  712.    designed to assure that the compromise of a CA in one part of the
  713.    hierarchy does not have global implications.
  714.  
  715.    The architecture does not require that CAs be off-line. The CA could
  716.    be software that can run on any node when the proper secret is
  717.    installed.  Administrative convenience can be gained by integrating
  718.    the CA with account registration utilities and naming service
  719.    maintenance. As such, the CA would have to be on-line when in use in
  720.    order to register certificates in the naming service.  The CA key
  721.    could be unlocked with a password and the password could be entered
  722.    on each use both to authenticate the CA operator and to assure that
  723.    compromise of the host node while the CA is not in use will not
  724.    compromise the CA.  This design would be subject to attacks based on
  725.    planting Trojan horses in the CA software, but is entirely
  726.    interoperable with a more secure implementation.  Realistic tradeoffs
  727.  
  728.  
  729.  
  730. Kaufman                                                        [Page 13]
  731.  
  732. RFC 1507                          DASS                    September 1993
  733.  
  734.  
  735.    must be made between security, cost, and administrative convenience
  736.    bearing in mind that a system is only as secure as its weakest link
  737.    and that there is no benefit in making the CA substantially more
  738.    secure than the other components of the system.
  739.  
  740. 1.3.4 Services Provided vs. Application Program Interface
  741.  
  742.    Section 3 of this document specifies "abstract interfaces" to the
  743.    services provided by DASS. This means it tells what services are
  744.    provided, what parameters are supplied by the caller, and what data
  745.    is returned. It does not specify the calling interfaces.  Calling
  746.    interfaces may be platform, operating system, and language dependent.
  747.    They do not affect interoperability; different implementations which
  748.    implement completely different calling interfaces can still
  749.    interoperate over a network. They do, however, affect portability. A
  750.    program which runs on one platform can only run on another which
  751.    implements an identical API.
  752.  
  753.    In order to support portability of applications - not just between
  754.    implementations of DASS but between implementations of DASS and
  755.    implementations of Kerberos - a "Generic Security Service API" has
  756.    been designed and is outlined in Annex B. This API could be the only
  757.    "published" interface to DASS services.  This interface does not,
  758.    however, give access to all the functions provided by DASS and it
  759.    provides some non-DASS services. It does not give access to the
  760.    "login" service, for example, so the login function cannot be
  761.    implemented in a portable way. Clearly an implementation must provide
  762.    some implementation of the login function, though perhaps only to one
  763.    system program and the implementation need not be portable.
  764.    Similarly, the Generic API provides no access to node authentication
  765.    information, so applications which use these services may not be
  766.    portable.
  767.  
  768.    The Generic API provides services for encryption of user data for
  769.    integrity and possibly privacy. These services are not specified as a
  770.    part of the DASS architecture. This is because we envisioned that
  771.    such services would be provided by the communications network and not
  772.    in applications. These services are provided by the Generic API
  773.    because these services are provided by Kerberos, there exist
  774.    applications which use these services, and they are desired in the
  775.    context of the IETF-CAT work. The DASS architecture includes a Key
  776.    Distribution service so that the encryption functions of the Generic
  777.    API can be supported and integrated. Annex B specifies how those
  778.    services can be implemented using DASS services.
  779.  
  780.    The Services Provided also differ from the GSSAPI because there are
  781.    important extensions envisioned to the API for future applications
  782.    and it was important to assure that architecturally those services
  783.  
  784.  
  785.  
  786. Kaufman                                                        [Page 14]
  787.  
  788. RFC 1507                          DASS                    September 1993
  789.  
  790.  
  791.    were available.  In particular, DASS provides the ability for a
  792.    principal to have multiple aliases and for the receiver of an
  793.    authentication token to verify any one of them.  We want DASS to
  794.    support the case where a server only learns the name it is trying to
  795.    validate in the course of evaluating an ACL.  This may be long after
  796.    a connection is accepted.  The Services Provided section therefore
  797.    separates the Accept_token function from the Verify Principal Name.
  798.    The other motivation behind a different interface is that DASS
  799.    provides node authentication - the ability to authenticate the node
  800.    from which a request originates as well as the user.  Because
  801.    Kerberos provides no such mechanism, the capability is missing from
  802.    the GSSAPI, but we expect some applications will want to make use of
  803.    it.
  804.  
  805. 1.3.5 Use of a Naming Service
  806.  
  807.    With the exception of the syntactical representation of names, which
  808.    is tied to X.500, the DASS architecture is designed to be independent
  809.    of the particular underlying naming service.  While the intention is
  810.    that certificates be stored in an X.500 naming service in the fields
  811.    architecturally reserved for this purpose in the standard, this
  812.    specification allows for the possibility of different forms of
  813.    certificate stores.  The SPX implementation of DASS implements its
  814.    own certificate distribution service because we did not want to
  815.    introduce a dependency on an X.500 naming service.
  816.  
  817. 1.3.6 Key Hiding - Credentials
  818.  
  819.    The abstract interfaces described in section 3 specify that
  820.    "credentials" and "keys" are the inputs and outputs of various
  821.    routines.  Credentials structures in particular contain secret
  822.    information which should not be made available to the calling
  823.    application.  In most cases, keeping this information from
  824.    applications is simply a matter of prudence - a misbehaving
  825.    application can do nearly as much damage using the credentials as it
  826.    can by using the secrets directly.  Having access to the keys
  827.    themselves may allow an application to bypass auditing or leak a key
  828.    to an accomplice who can use it on another node where a large amount
  829.    of activity is less likely to be noticed.  In some cases, most
  830.    dramatically where a "node key" is present in user credentials, it is
  831.    vital that the contents of the credentials be kept out of the hands
  832.    of applications.
  833.  
  834.    To accomplish this, a concrete interface is expected to create
  835.    "credentials handles" that are passed in and out of DASS routines.
  836.    The credentials themselves would be kept in some portion of memory
  837.    where unprivileged code can't get at them.
  838.  
  839.  
  840.  
  841.  
  842. Kaufman                                                        [Page 15]
  843.  
  844. RFC 1507                          DASS                    September 1993
  845.  
  846.  
  847.    There is another aspect of the way credentials are used which is
  848.    important to the design of real implementations.  In normal use, a
  849.    user will create a set of credentials in the process of logging on to
  850.    a system and then use them from many processes or jobs.  When many
  851.    processes share a set of credentials, it is important for the sake of
  852.    performance that they share one set of credentials rather than having
  853.    a copy of the credentials made for each.  This is because information
  854.    is cached in credentials as a side effect of some requests and for
  855.    good performance those caches should be shared.
  856.  
  857.    As an example, consider a system executing a series of copy commands
  858.    moving files from one system to another.  The credentials of the user
  859.    will have been established when the user logged on.  The first time a
  860.    copy is requested, a new process will start up, open a connection to
  861.    the destination system, and create a token to authenticate itself.
  862.    Creating that token will be an expensive operation, but information
  863.    will be computed and "cached" in the credentials structure which will
  864.    allow any subsequent tokens on behalf of that user to that server to
  865.    be computed cheaply.  After the copy completes, the connection is
  866.    closed and the process terminates.  In response to a second copy
  867.    request, another new process will be created and a new token
  868.    computed.  For this operation to get a performance benefit from the
  869.    caching, the information computed by the first process must somehow
  870.    make it to the second.
  871.  
  872.    A model for how this caching might work can be seen in the way
  873.    Kerberos caches credentials.  Kerberos keeps credentials in a file
  874.    whose name can be computed from the name of the local user.  This
  875.    file is initialized as part of the login process and its protection
  876.    is set so that only processes running under the UID of the user may
  877.    read and write the file.  Processes cache information there; all
  878.    processes running on behalf of the user share the file.
  879.  
  880.    There are two problems with this scheme: first, on a diskless node
  881.    putting information in a file exposes it to eavesdroppers on the
  882.    network; second, it does not accomplish the "key hiding" function
  883.    described earlier in this section.  In a more secure implementation,
  884.    the kernel or a privileged process would manage some "pool" of
  885.    credentials for all processes on a node and would grant access to
  886.    them only through the DASS calls.  Credentials structures are complex
  887.    and varying length; DASS may organize them as a set of pools rather
  888.    than as contiguous blocks of data.  All such design issues are
  889.    "beyond the scope of the architecture".  Implementations must decide
  890.    how to control access to credentials.  They could copy the Kerberos
  891.    scheme of having credentials available to processes with the UID of
  892.    the login session which created them and to privileged processes or
  893.    there may be a more elaborate mechanism for "passing" credentials
  894.    handles from process to process.  This design should probably follow
  895.  
  896.  
  897.  
  898. Kaufman                                                        [Page 16]
  899.  
  900. RFC 1507                          DASS                    September 1993
  901.  
  902.  
  903.    the operating system mechanisms for passing around local privileges.
  904.  
  905. 1.3.7 Key Hiding - Contexts
  906.  
  907.    The "GSSAPI" has a concept of a security context which has some of
  908.    the same key hiding problems as a credentials structure.  Security
  909.    contexts are used in calls to cryptographically protect user data
  910.    (from modification or from disclosure and modification) using keys
  911.    established during authentication.  The "services provided"
  912.    specification says that create_ and accept_token return a "shared
  913.    key" and "instance identifier".  The GSSAPI says that a context
  914.    handle is returned which is an integer.  A secure implementation
  915.    would keep the key and instance identifier in protected memory and
  916.    only allow access to them through provided interfaces.
  917.  
  918.    Unlike credentials, there is probably no need to provide mechanisms
  919.    for contexts to be shared between processes.  Contexts will normally
  920.    be associated with some notion of a communications "connection" and
  921.    ends of a connection are not normally shared.  If an implementation
  922.    chooses to provide additional services to applications like message
  923.    sequencing or duplicate detection, contexts will have to contain
  924.    additional fields.  These can be created and maintained without any
  925.    additional authentication services.
  926.  
  927. 1.4 The Relationship between DASS and ISO Standards
  928.  
  929.    This section provides an introduction to DASS authentication in terms
  930.    of the ISO Authentication Framework (DP10181-2).   The purpose of
  931.    this introduction is to give the reader an intuitive understanding of
  932.    the way DASS works and how its mechanisms and terminology relate to
  933.    standards.  Important details have been omitted here but are spelled
  934.    out in section 3.
  935.  
  936. 1.4.1 Concepts
  937.  
  938.    The primary goal of authentication is to prevent impersonation, that
  939.    is, the pretense to a false identity. Authentication always involves
  940.    identification in some form. Without authentication, anyone could
  941.    claim to be whomever they wished and get away with it.
  942.  
  943.    If it didn't matter with whom one was communicating, elaborate
  944.    procedures for authentication would be unnecessary. However, in most
  945.    systems, and in timesharing and distributed processing environments
  946.    in particular, the rights of individuals are often circumscribed by
  947.    security policy. In particular, authorization (identity based access
  948.    control) and accountability (audit) provisions could be circumvented
  949.    if masquerading attempts were impossible to prevent or detect.
  950.  
  951.  
  952.  
  953.  
  954. Kaufman                                                        [Page 17]
  955.  
  956. RFC 1507                          DASS                    September 1993
  957.  
  958.  
  959.    Almost all practical authentication mechanisms suitable for use in
  960.    distributed environments rely on knowledge of some secret
  961.    information. Most differences lie in how one presents evidence that
  962.    they know the secret. Some schemes, in particular the familiar simple
  963.    use of passwords, are quite susceptible to attack. Generally, the
  964.    threats to authentication may be classified as:
  965.  
  966.     - forgery, attempting to guess or otherwise fabricate evidence;
  967.  
  968.     - replay, where one can eavesdrop upon another's authentication
  969.       exchange and learn enough to impersonate them; and
  970.  
  971.     - interception, where one slips between the communicants and is
  972.       able to modify the communications channel unnoticed.
  973.  
  974.    Most such attacks can be countered by using what is known as strong
  975.    authentication. Strong authentication refers to techniques that
  976.    permit one to provide evidence that they know a particular secret
  977.    without revealing even a hint about the secret. Thus neither the
  978.    entity to whom one is authenticating, nor an eavesdropper on the
  979.    conversation can further their ability to impersonate the
  980.    authenticating principal at some future time as the result of an
  981.    authentication exchange.
  982.  
  983.    Strong authentication mechanisms, in particular those used here, rely
  984.    on cryptographic techniques. In particular, DASS uses public key
  985.    cryptography. Note that interception attacks cannot be countered by
  986.    strong authentication alone, but generally need additional security
  987.    mechanisms to secure the communication channel, such as data
  988.    encryption.
  989.  
  990. 1.4.2 Principals and Their Roles
  991.  
  992.    All authentication is on behalf of principals. In DASS the following
  993.    types of principals are recognized:
  994.  
  995.     - user principals, normally people with accounts who are
  996.       responsible for performing particular tasks. Generally it is
  997.       users that are authorized to do things by virtue of having
  998.       been granted access rights, or who are to be held accountable
  999.       for specific actions subject to being audited.
  1000.  
  1001.     - server principals, which are accessed by users.
  1002.  
  1003.     - node principals,  corresponding to locations where users and
  1004.       servers, or more accurately, processes acting on behalf of
  1005.       principals can reside.
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Kaufman                                                        [Page 18]
  1011.  
  1012. RFC 1507                          DASS                    September 1993
  1013.  
  1014.  
  1015.    Principals can act in one of two capacities:
  1016.  
  1017.     - the claimant is the active entity seeking to authenticate
  1018.       itself, and
  1019.  
  1020.     - the verifier is the passive entity to whom the claimant is
  1021.       authenticating.
  1022.  
  1023.    Users normally are claimants, whereas servers are usually verifiers,
  1024.    although sometimes servers can also be claimants.
  1025.  
  1026.    There is another kind of principal:
  1027.  
  1028.     - certification authorities (CA's) issue certificates which
  1029.       attest to another principal's public key.
  1030.  
  1031. 1.4.3 Representation, Delegation and Representation Transfer
  1032.  
  1033.    Of course, although it is users that are responsible for what the
  1034.    computer does, human beings are physically unable to directly do
  1035.    anything within a computer system. In point of fact, it is a
  1036.    process executing on behalf of a user that actually performs
  1037.    useful work. From the point of view of performing security
  1038.    controlled functions, the process is the agent, or
  1039.    representative, of the user, and is authorized by that user to do
  1040.    things on his behalf. In the terms used in the ISO Authentication
  1041.    Framework, the user is said to have a representation in the
  1042.    process.
  1043.  
  1044.    The representation has to come into existence somehow.  Delegation
  1045.    refers to the act of creating a representation. A user is said to
  1046.    create a representation for themselves by delegating to a process. If
  1047.    the user creates another process, say by doing an rlogin on a
  1048.    different computer, a representation may be needed there as well. This
  1049.    may be accomplished automatically by a process known as representation
  1050.    transfer.  DASS uses the term delegation to also mean the act of
  1051.    creating additional representations on a remote systems.
  1052.  
  1053.    A representation is instantiated in DASS as credentials.  Credentials
  1054.    include the identity of the principal as well as the cryptographic
  1055.    "state" needed to engage in strong authentication procedures. Claimant
  1056.    information in credentials enable principals to authenticate
  1057.    themselves to others, whereas verifier information in credentials
  1058.    permit principals to verify the claims of others.  Credentials
  1059.    intended primarily for use by a claimant will be referred to as
  1060.    claimant credentials in the text which follows.  Credentials intended
  1061.    primarily for use in verification will be referred to as verifier
  1062.    credentials.  A particular set of credentials may or may not contain
  1063.  
  1064.  
  1065.  
  1066. Kaufman                                                        [Page 19]
  1067.  
  1068. RFC 1507                          DASS                    September 1993
  1069.  
  1070.  
  1071.    all of the data necessary to be used in both roles.  That will depend
  1072.    on the mechanisms by which the credentials were created.
  1073.  
  1074.    In some contexts, but not here, the concept of representation
  1075.    and/or delegation is sometimes referred to as proxy. This term is
  1076.    used in ECMA TR/46.  We avoid use of the term because of possible
  1077.    confusion with an unrelated use of the term in the context of
  1078.    DECnet.
  1079.  
  1080. 1.4.4 Key Distribution, Replay, Mutual Authentication and Trust
  1081.  
  1082.    Strong authentication uses cryptographic techniques. The
  1083.    particular mechanisms used in DASS result in the distribution of
  1084.    cryptographic keys as a side effect. These keys are suitable for
  1085.    use for providing a data origin authentication service and/or a
  1086.    data confidentiality service between a pair of authenticated
  1087.    principals.
  1088.  
  1089.    Replay detection is provided using timestamps on relevant
  1090.    authentication messages, combined with remembering previously
  1091.    accepted messages until they become "stale". This is in contrast
  1092.    to other techniques, such as challenge and response exchanges.
  1093.  
  1094.    Authentication can be one-way or mutual. One-way authentication is
  1095.    when only one party, in DASS the claimant, authenticates to the other.
  1096.    Mutual authentication provides, in addition, authentication of the
  1097.    verifier back to the claimant. In certain communications schemes, for
  1098.    example connectionless transfer, only one-way authentication is
  1099.    meaningful. DASS supports mutual authentication as a simple extension
  1100.    of one-way authentication for use in environments where it makes
  1101.    sense.
  1102.  
  1103.    DASS potentially can allow many different "trust relationships"
  1104.    to exist. All principals trust one or more CA's to safeguard the
  1105.    certification process. Principals use certificates as the basis
  1106.    for authenticating identities, and trust that CA's which issue
  1107.    certificates act responsibly. Users expect CA's to make sure that
  1108.    certificates (and related secrets) are only made for principals
  1109.    that the CA knows or has properly authenticated on its own.
  1110.  
  1111. 1.5 An Authentication Walkthrough
  1112.  
  1113.    The OSI Authentication Framework characterizes authentication as
  1114.    occurring in six phases. This section attempts to describe DASS
  1115.    in these terms.
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Kaufman                                                        [Page 20]
  1123.  
  1124. RFC 1507                          DASS                    September 1993
  1125.  
  1126.  
  1127. 1.5.1 Installation
  1128.  
  1129.    In this phase, principal certificates are created, as is the
  1130.    additional information needed to create claimant and verifier
  1131.    credentials. OSI defines three sub-phases:
  1132.  
  1133.     - Enrollment. In DASS, this is the definition of a principal in
  1134.       terms of a key, name and UID.
  1135.  
  1136.     - Validation,  confirmation of identity to the satisfaction of
  1137.       the CA, after which the CA generates a certificate.
  1138.  
  1139.     - Confirmation.  In DASS, this is the act of providing the user
  1140.       with the certificate and with the CA's own name, key and UID,
  1141.       followed up by the user creating a  trusted authority for that
  1142.       CA. A trusted authority is a certificate for the CA signed by
  1143.       the user.
  1144.  
  1145.    Included in this step in DASS is the posting of the certificate so as
  1146.    to be available to principals wishing to verify the principal's
  1147.    identity. In addition, the user principal saves the trusted authority
  1148.    so as to be available when it creates credentials.
  1149.  
  1150. 1.5.2 Distribution
  1151.  
  1152.    DASS distributes certificates by placing them in the name service.
  1153.  
  1154. 1.5.3 Acquisition
  1155.  
  1156.    Whenever principals wish to authenticate to one another, they access
  1157.    the Name Service to obtain whatever public key certificates they need
  1158.    and create the necessary credentials. In DASS, acquisition means
  1159.    obtaining credentials.
  1160.  
  1161.    Claimant credentials implement the representation of a principal in a
  1162.    process, or, more accurately, provide a representation of the
  1163.    principal for use by a process. In making this representation, the
  1164.    principal delegates to a temporary delegation key. In this fashion
  1165.    the claimant's long term principal key need not remain in the system.
  1166.  
  1167.    Claimant credentials are made by invoking the get credentials
  1168.    primitive. Claimant credentials are a DASS specific data structure
  1169.    containing:
  1170.  
  1171.     - a name
  1172.  
  1173.     - a ticket, a data structure containing
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Kaufman                                                        [Page 21]
  1179.  
  1180. RFC 1507                          DASS                    September 1993
  1181.  
  1182.  
  1183.       .  a validity interval,
  1184.  
  1185.       .  UID, and
  1186.  
  1187.       .  (temporary) delegation public key, along with a
  1188.  
  1189.       .  digital signature on the above made with the principal
  1190.          private key
  1191.  
  1192.     - the delegation private key
  1193.  
  1194.    Optionally in addition, there may be credential information relating
  1195.    to the node on which the user is logged in and the account on that
  1196.    node.  A detailed description of all the information found in
  1197.    credentials can be found in section 3.  Verifier credentials are made
  1198.    with initialize_server. Verifier credentials consist of a principal
  1199.    (long term) private key. The rationale is that these credentials are
  1200.    usually needed by servers that must be able to run indefinitely
  1201.    without re-entry of any long term key.
  1202.  
  1203.    In addition, claimants and verifiers have a trusted authority, which
  1204.    consists of information about a trusted CA.  That information is its:
  1205.  
  1206.     - name (this will appear in the "issuer" field in principal
  1207.       certificates),
  1208.  
  1209.     - public key (to use in verifying certificates issued by that
  1210.       CA), and
  1211.  
  1212.     - UID.
  1213.  
  1214.    Trusted authorities are used by principals to verify certificates for
  1215.    other principals' public keys.  CAs are arranged in a hierarchy
  1216.    corresponding to the naming hierarchy, where each directory in the
  1217.    naming hierarchy is controlled by a single CA.  Each CA certifies the
  1218.    CA of its parent directory, the CAs of each of its child directories,
  1219.    and optionally CAs elsewhere in the naming hierarchy (mainly to deal
  1220.    with the case where the directories up to a common ancestor lack
  1221.    CAs).  Even though a principal has only a single CA as a trusted
  1222.    authority, it can securely obtain the public key of any principal in
  1223.    the namespace by "walking the CA hierarchy".
  1224.  
  1225. 1.5.4 Transfer
  1226.  
  1227.    The DASS exchange of authentication information is illustrated in
  1228.    Figure 1-1. During the transfer phase, the DASS claimant sends an
  1229.    authentication token  to the verifier. Authentication tokens are made
  1230.    by invoking the create_token primitive. The authentication token is
  1231.  
  1232.  
  1233.  
  1234. Kaufman                                                        [Page 22]
  1235.  
  1236. RFC 1507                          DASS                    September 1993
  1237.  
  1238.  
  1239.    cryptographically protected and specified as a DASS data structure in
  1240.    ASN.1. The authentication token includes:
  1241.  
  1242.     - a ticket,
  1243.  
  1244.     - a DES authenticating key encrypted using the intended
  1245.       verifier's public key
  1246.  
  1247.     - one of the following:
  1248.  
  1249.       . if delegation is not being performed, a digital signature on
  1250.         the encrypted DES key using the delegation private key, or
  1251.  
  1252.       . if delegation is being performed, sending the delegation
  1253.         private key, DES encrypted using the DES authenticating key
  1254.  
  1255.     - an authenticator, which is a cryptographic checksum made using
  1256.       the DES authenticating key over a buffer containing
  1257.  
  1258.       . a timestamp
  1259.  
  1260.       . any application supplied "channel bindings". For example,
  1261.         addresses or other context information. The purpose of this
  1262.         field is to thwart substitution and replay attacks.
  1263.  
  1264.     - additional optional information concerning node authentication
  1265.       and context.
  1266.  
  1267.    As a side effect, after init_authentication_context, the caller
  1268.    receives a local authentication context, a data structure containing:
  1269.  
  1270.     - the DES key, and
  1271.  
  1272.     - if mutual authentication is being requested, the expected
  1273.       response.
  1274.  
  1275.    In order to construct an authentication token, the claimant needs to
  1276.    access the verifier's public key certificate from the Name Service
  1277.    (labeled CDC, for Certificate Distribution Center, in the figure).
  1278.  
  1279.    Note that while an authenticator can only be used once, it is
  1280.    permissible to re-establish the same local authentication context
  1281.    multiple times. That is, the ticket and DES key establishment
  1282.    components of the authentication token may have a relatively long
  1283.    lifetime. This permits a performance improvement in that repeated
  1284.    applications of public key operations can be alleviated if one caches
  1285.    authentication contexts, along with other components from a
  1286.    successfully used authentication token and the associated verified
  1287.  
  1288.  
  1289.  
  1290. Kaufman                                                        [Page 23]
  1291.  
  1292. RFC 1507                          DASS                    September 1993
  1293.  
  1294.  
  1295.    principal public key value. It is a relatively inexpensive operation
  1296.    to create (and verify) "fresh" authenticators based on cached
  1297.    authentication context.
  1298.  
  1299.       Claimant Actions      | Communications |  Verifier Actions
  1300.                             |                |
  1301.            verifier name    |                |
  1302.                    |        |                |
  1303.                    |        |           +---+|
  1304.                    \------------------->|   ||
  1305.      trusted                |           |   ||
  1306.    authorities              |           |CDC||
  1307.         |    +-----------+  |certificate|   ||
  1308.         |    |  Verify   |<-------------|   ||
  1309.         \--->|Certificate|  |           +---+|
  1310.              +-----------+  |                |
  1311.      Claimant        |      |                |
  1312.    credentials    Verifier  |                |   Verifier
  1313.         |       Public Key  |                | Credentials
  1314.         |            |      |                |       |
  1315.         |            V      |                |       V
  1316.         |    +-----------+  | Authentication | +-----------+
  1317.         |    |   Make    |  |     Token      | |   Check   |   Replay
  1318.         \--->|  Token    |-------------------->|   Token   |<-->Cache
  1319.              +-----------+  |                | +-----------+
  1320.       DES <---/      |      |                |  |   |    \----->DES
  1321.       key            |      |                | /Claimant        key
  1322.                      |      |                |/Public Key
  1323.                      |      |                /      |        trusted
  1324.                      |      |      Claimant /|      V     authorities
  1325.                      |      |+---+   Name  / | +-----------+     |
  1326.             authentication  ||   |<-------/  | |  Verify   |<----/
  1327.                context      ||   |certificate| |Certificate|
  1328.                      |      ||CDC|------------>|           |-->accept/
  1329.                      |      ||   |           | +-----------+   reject
  1330.                      |      ||   |           |      |      \
  1331.                      |      |+---+           |authentication\
  1332.                      V      |     mutual     |   context     V
  1333.              +-----------+  | authentication |      |      claimant
  1334.           /--|  Accept   |  |    response    | +----------+credentials
  1335.          V   |  Mutual   |<--------------------|  Make    |(delegation)
  1336.      accept/ +-----------+  |                | | Response |
  1337.      reject                 |                | +----------+
  1338.                             |                |
  1339.  
  1340.  
  1341.               Figure 1 - Authentication Exchange Overview
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Kaufman                                                        [Page 24]
  1347.  
  1348. RFC 1507                          DASS                    September 1993
  1349.  
  1350.  
  1351. 1.5.5 Verification
  1352.  
  1353.    Upon receipt of an authentication token, the verifier extracts the
  1354.    DES key using its verifier credentials, accesses the Name Service
  1355.    (labeled CDC for Certificate Distribution Center) to obtain the
  1356.    certificates needed to perform cryptographic checks on the incoming
  1357.    information, and verifies all of the signatures on the received
  1358.    certificates and the authentication token.  Verification can result
  1359.    in creation of new claimant credentials if delegation is performed.
  1360.  
  1361.    As part of this process, verified authenticators are retained for a
  1362.    suitable timeout period.
  1363.  
  1364. 1.5.6 Unenrolment
  1365.  
  1366.    This is the removal of information from the Name Service. The only
  1367.    other form of revocation supported by DASS is certificate timeout.
  1368.    Every certificate contains an expiration time (expected in ordinary
  1369.    use to be about a year from its signing date).  DASS does not
  1370.    currently support the revocation lists in X.509.
  1371.  
  1372. 2. Services Used
  1373.  
  1374.    Aside from operating system services needed to maintain its internal
  1375.    state, DASS relies on a global distributed database in which to store
  1376.    its certificates, a reliable source of time, and a source of random
  1377.    numbers for creating cryptographic keys.
  1378.  
  1379. 2.1 Time Service
  1380.  
  1381.    DASS requires access to the current time in several of its
  1382.    algorithms.  Some of its uses of time are security critical.  In
  1383.    others, network synchronization of clocks is required.  DASS does
  1384.    not, however, depend on having a single source of time which is both
  1385.    secure and tightly synchronized.
  1386.  
  1387.    The requirements on system provided time are:
  1388.  
  1389.     - For purposes of validating certificates and tickets, the
  1390.       system needs access to know the date and time accurate to
  1391.       within a few hours with no particular synchronization
  1392.       requirements.  If this time is inaccurate, then valid requests
  1393.       may be rejected and expired messages may be accepted.
  1394.       Certificate expiration is a backup revocation mechanism, so
  1395.       this can only cause a security compromise in the event of
  1396.       multiple failures.  In theory, this could be provided by
  1397.       having a local clock on every node accurate to within a few
  1398.       hours over the life of the product to provide this function.
  1399.  
  1400.  
  1401.  
  1402. Kaufman                                                        [Page 25]
  1403.  
  1404. RFC 1507                          DASS                    September 1993
  1405.  
  1406.  
  1407.       If an insecure network time service is used to provide this
  1408.       time, there are theoretical security threats, but they are
  1409.       expected to be logistically impractical to exploit.
  1410.  
  1411.     - For purposes of detecting replay of authentication tokens, the
  1412.       system needs access to a  strictly monotonic time source which
  1413.       is reasonably synchronized across the network (within a few
  1414.       minutes) for the system to work, but inaccuracy does not
  1415.       present a security threat except as noted below. It may
  1416.       constitute an availability threat because valid requests may
  1417.       be rejected.  In order to get strict monotonicity in the
  1418.       presence of a rapid series of requests, time must be returned
  1419.       with high precision.  There is no requirement for a high
  1420.       degree of accuracy.  Inaccurate time could present a security
  1421.       threat in the following scenario: if a client's clock is made
  1422.       sufficiently fast that its tokens are rejected, someone
  1423.       harvesting those tokens from the wire could replay them later
  1424.       and impersonate the client.  In some environments, this might
  1425.       be an easier threat than harvesting tokens and preventing
  1426.       their delivery.
  1427.  
  1428.     - For purposes of aging stale entries from caches, DASS requires
  1429.       reasonably accurate timing of intervals.  To the extent that
  1430.       intervals are reported as shorter than the actually were,
  1431.       revocation of certificates from the naming service may not be
  1432.       as timely as it should be.
  1433.  
  1434. 2.2 Random Numbers
  1435.  
  1436.    In order to generate keys, DASS needs a source of "cryptographic
  1437.    quality" random numbers.  Cryptographic quality means that
  1438.    knowing any of the "random numbers" returned from a series and
  1439.    knowing all state information which is not protected, an attacker
  1440.    cannot predict any of the other numbers in the series.  Hardware
  1441.    sources are ideal, but there are alternative techniques which may
  1442.    also be acceptable. A 56 bit "truly random" seed (say from a
  1443.    series of coin tosses) could be used as a DES key to encrypt an
  1444.    infinite length known text block in CBC mode to produce a pseudo-rand
  1445.    sequence provided the key and current point in the sequence were
  1446.    adequately protected.  There is considerable controversy
  1447.    surrounding what constitutes cryptographic quality random
  1448.    numbers, and it is not a goal of this document to resolve it.
  1449.  
  1450. 2.3 Naming Service
  1451.  
  1452.    DASS stores creates and uses "certificates" associated with every
  1453.    principal in the system, and encrypted credentials associated
  1454.    with most.  This information is stored in an on-line service
  1455.  
  1456.  
  1457.  
  1458. Kaufman                                                        [Page 26]
  1459.  
  1460. RFC 1507                          DASS                    September 1993
  1461.  
  1462.  
  1463.    associated with the principal being certified.  The long term
  1464.    vision is for DASS to use an X.500 naming service, and DASS will
  1465.    from its inception authenticate X.500 names.  To avoid a
  1466.    dependence on having an X.500 naming service available (and to
  1467.    gain the benefits of a "login agent" that controls password
  1468.    guessing), an alternative certificate  distribution center
  1469.    protocol is also described.
  1470.  
  1471.    The specific requirements DASS places on the naming service are:
  1472.  
  1473.     - It must be highly available.  A user's naming service entry
  1474.       must be available to any node where the user is to obtain
  1475.       services (or service will be denied).  A server's naming
  1476.       service entry must be available from any node from which the
  1477.       service is to be invoked (or service will be denied).
  1478.  
  1479.     - It must be timely.  The presence of "stale" information in the
  1480.       naming service may cause some problems.  When a password
  1481.       changes, the old password may remain valid (and the new
  1482.       password invalid) to the extent the naming service provides
  1483.       stale information.  When a user or server is added to the
  1484.       network, it will not be able to participate in authentication
  1485.       until the information added to the naming service is available
  1486.       at the node doing the authentication.  In the unusual
  1487.       circumstance that a key changes, the entity whose key has
  1488.       changed will not be able to use the new key until the new
  1489.       certificate is uniformly available.
  1490.  
  1491.     - It must be secure with regard to certain specific properties.
  1492.       In general, the security of DASS protected applications does
  1493.       not depend on the security of the naming service.  It is
  1494.       expected that the availability needs of the naming service
  1495.       will prevent it from being as secure as some applications need
  1496.       to be.  There are two aspects of DASS security which do depend
  1497.       on the security of the naming service: timely revocation of
  1498.       certificates and protection of user secrets against dictionary
  1499.       based password guessing. DASS depends on the removal of
  1500.       certificates from the naming service in order to revoke them
  1501.       more quickly than waiting for them to time out.  For this
  1502.       mechanism to provide any actual security, it must not be
  1503.       possible for a network entity to "impersonate" the naming
  1504.       service and the naming service must be able to enforce access
  1505.       controls which prevent a revoked certificate from being
  1506.       reinstated by an unauthorized entity.  In the long run, it is
  1507.       expected that DASS itself will be used to secure the naming
  1508.       service, which presents certain potential recursion problems
  1509.       (to be addressed in the naming service design).  If the naming
  1510.       service is not authenticated (as is expected in early
  1511.  
  1512.  
  1513.  
  1514. Kaufman                                                        [Page 27]
  1515.  
  1516. RFC 1507                          DASS                    September 1993
  1517.  
  1518.  
  1519.       versions) attacks where a revoked certificate is "reinstated"
  1520.       through impersonation of the naming service are possible.
  1521.  
  1522.    The specific functions DASS requests of the naming service are
  1523.    simple:
  1524.  
  1525.     - Given an X.500 name, store a set of certificates associated
  1526.       with that name.
  1527.  
  1528.     - Given an X.500 name, retrieve the set of certificates
  1529.       associated with that name.
  1530.  
  1531.     - Given an X.500 name, store a set of encrypted credentials
  1532.       associated with that name.
  1533.  
  1534.     - Given and X.500 name, retrieve a set of encrypted credentials
  1535.       associated with that name.
  1536.  
  1537.    Implementation over a particular naming service may implement more
  1538.    specialized functions for reasons of efficiency.  For example, the
  1539.    certificates associated with a name may be separated into several
  1540.    sets (child, parent, cross, self) so that only the relevant ones may
  1541.    be retrieved.  In order that access to the naming service itself be
  1542.    secure, the protocols should be authenticated.  Certificates should
  1543.    generally be readable without authentication in order to avoid
  1544.    recursion problems.  Requests to read encrypted credentials should be
  1545.    specialized and should include proof of knowledge of the password in
  1546.    order that the naming service can audit and slow down false password
  1547.    guesses.
  1548.  
  1549.    The following sections describe the interfaces to specific naming
  1550.    services:
  1551.  
  1552. 2.3.1 Interface to X.500
  1553.  
  1554.    Certificates associated with a particular name are stored as
  1555.    attributes of the entry as specified in X.509.  X.509 defines
  1556.    attributes appropriate for parent and cross certificates
  1557.    (CrossCertificatePair, CACertificate) for some principals; we will
  1558.    have to define a DASSUserPrincipal object class including these
  1559.    attributes in order to properly use them with ordinary users.
  1560.    Retrieval is via normal X.500 protocols.  Certificates should be
  1561.    world readable and modifiable only by appropriate authorities.
  1562.  
  1563.    Encrypted credentials are stored with the entry of the principal
  1564.    under a yet to be defined attribute.  The credentials should be
  1565.    encoded as specified in section 4.  In the absence of extensions to
  1566.    the X.500 protocol to control password guessing, the encrypted
  1567.  
  1568.  
  1569.  
  1570. Kaufman                                                        [Page 28]
  1571.  
  1572. RFC 1507                          DASS                    September 1993
  1573.  
  1574.  
  1575.    credentials should be world readable and updatable only by the named
  1576.    principal and other appropriate authorities.
  1577.  
  1578. 2.3.2 Interface to CDC
  1579.  
  1580.    The CDC (Certificate Distribution Center) is a special purpose name
  1581.    server created to service DASS until an X.500 service is available in
  1582.    all of the environments where DASS needs to operate.  The CDC uses a
  1583.    special purpose protocol to communicate with DASS clients.  The
  1584.    protocol was designed for efficiency, simplicity, and security.  CDCs
  1585.    use DASS as an authentication mechanism and to protect encrypted
  1586.    credentials from unaudited password guessing.
  1587.  
  1588.    Each DASS client maintains a list of CDCs and the portion of the
  1589.    namespace served by that CDC.  Each directory has a master replica
  1590.    which is the only one which will accept updates.  The CDCs maintain
  1591.    consistency with one another using protocols beyond the scope of this
  1592.    document.  When a DASS client wishes to make a request of a CDC, it
  1593.    opens a TCP or DECnet connection to the CDC and sends an ASN.1 (BER)
  1594.    encoded request and receives a corresponding ASN.1 (BER) encoded
  1595.    response.  Clients are expected to learn the IP or DECnet address and
  1596.    port number of the CDC supporting a particular name from a local
  1597.    configuration file.  To maximize performance, the requests bundle
  1598.    what would be several requests if made in terms of requests for
  1599.    individual certificates.  It is intended that all certificates needed
  1600.    for an authentication operation be retrievable with at most two CDC
  1601.    requests/responses (one to the CDC of the client and one to the CDC
  1602.    of the server).
  1603.  
  1604.    Documented here is the protocol a DASS client would use to retrieve
  1605.    certificates and credentials from a CDC and update a user password.
  1606.    This protocol does not provide for updates to the certificate and
  1607.    credential databases.  Such updates must be supported for a practical
  1608.    system, but could be done either by extensions to this protocol or by
  1609.    local security mechanisms implemented on nodes supporting the CDC.
  1610.    Similarly, availability can be enhanced by replicating the CDC.
  1611.    Automating the replication of updates could be implemented by
  1612.    extensions to this protocol or by some other mechanism.  This
  1613.    specification assumes that updates and replication are local matters
  1614.    solved by individual CA/CDC implementations.
  1615.  
  1616.    Requests and responses are encoded as follows:
  1617.  
  1618. 2.3.2.1 ReadPrinCertRequest
  1619.  
  1620.    This request asks the CDC to return the child certificates and
  1621.    selected incoming cross certificates for the specified object.  The
  1622.    format of the request is:
  1623.  
  1624.  
  1625.  
  1626. Kaufman                                                        [Page 29]
  1627.  
  1628. RFC 1507                          DASS                    September 1993
  1629.  
  1630.  
  1631.         ReadPrinCertRequest ::= [4] IMPLICIT SEQUENCE {
  1632.              flags [0] BIT STRING DEFAULT {},
  1633.              index [1] IMPLICIT INTEGER DEFAULT 0,
  1634.              resolveFrom [2] Name OPTIONAL,
  1635.              principal Name,
  1636.              crossCertIssuers ListOfIssuers OPTIONAL
  1637.              }
  1638.         ListOfIssuers ::= SEQUENCE OF Name
  1639.  
  1640.    The first 24 bits of flags, if present, contain a protocol version
  1641.    number.  Clients following this spec should place the value 2.0.0 in
  1642.    the three bytes.  Servers following this spec should accept any value
  1643.    of the form 1.x.x or 2.x.x.  flags bits beyond the first 24 are
  1644.    reserved for future use (should not be supplied by clients and should
  1645.    be ignored by servers).
  1646.  
  1647.    index is only used if the response exceeds the size of a single
  1648.    message; in that case, the query is repeated with index set to the
  1649.    value that was returned by ReadPrinCertResponse.  resolveFrom and
  1650.    principal imply a set of entities for which certificates should be
  1651.    retrieved.  resolveFrom (if present) must be an ancestor of principal
  1652.    and child certificates will be retrieved for principal and all names
  1653.    which are ancestors of principal but descendants of resolveFrom.  The
  1654.    encoding of names is per X.500 and is specified in more detail in
  1655.    section 4.  The CDC returns the certificates in order of the object
  1656.    they came from, parents before children.
  1657.  
  1658.    crossCertIssuers is a list of cross certifiers that would be believed
  1659.    in the context of this authentication.  If supplied, the CDC may
  1660.    return a chain of certificates starting with one of the named
  1661.    crossCertIssuers and ending with the named principal.  One of
  1662.    resolveFrom or crossCertIssuers must be present in any request; if
  1663.    both are present, the CDC may return either chain.
  1664.  
  1665. 2.3.2.2 ReadPrinCertResponse
  1666.  
  1667.    This is the response a CDC sends to a ReadPrinCertRequest.  Its
  1668.    syntax is:
  1669.  
  1670.         ReadPrinCertResponse ::= [5] IMPLICIT SEQUENCE {
  1671.              status [0] IMPLICIT CDCstatus DEFAULT success,
  1672.              index [1] INTEGER OPTIONAL,
  1673.              resolveTo [2] Name OPTIONAL,
  1674.              certSequence [3] IMPLICIT CertSequence,
  1675.              indexInvalidator [4] OCTET STRING (SIZE(8)) OPTIONAL,
  1676.              flags [5] BIT STRING OPTIONAL
  1677.              }
  1678.         CertSequence ::= SEQUENCE OF Certificate
  1679.  
  1680.  
  1681.  
  1682. Kaufman                                                        [Page 30]
  1683.  
  1684. RFC 1507                          DASS                    September 1993
  1685.  
  1686.  
  1687.    status indicates success or the cause of the failure.
  1688.  
  1689.    index if present indicates that the request could not be fully
  1690.    satisfied in a single request because of size limitations.  The
  1691.    request should be repeated with this index supplied in the request to
  1692.    get more.
  1693.  
  1694.    resolveTo will be present if index is present and should be supplied
  1695.    in the request for more certificates.  certSequence contains
  1696.    certificates found matching the search criteria.
  1697.  
  1698.    indexInvalidator may be present and indicates the version of the
  1699.    database being read.  If a set of certificates is being read in
  1700.    multiple requests (because there were too many to return in a single
  1701.    message), the reader should check that the value for indexInvalidator
  1702.    is the same on each request.  If it is not, the server may have
  1703.    skipped or duplicated some certificates.  This field must not be
  1704.    present if the version number in the request was missing or version
  1705.    1.x.x.
  1706.  
  1707.    The first 24 bits of flags, if present, indicate the protocol version
  1708.    number.  Implementers of this version of the spec should supply 2.0.0
  1709.    and should accept any version number of the form 1.x.x or 2.x.x.
  1710.  
  1711. 2.3.2.3 ReadOutgoingCertRequest
  1712.  
  1713.    This requests from the CDC a list of all parent and outgoing cross
  1714.    certificates for a specified object.  A CDC is capable of storing
  1715.    cross certificates either with the subject or the issuer of the cross
  1716.    certificate.  In response to this request, the CDC will return all
  1717.    parent and cross certificates stored with the issuer for the named
  1718.    principal and all of its ancestors. Its syntax is:
  1719.  
  1720.         ReadOutgoingCertRequest ::= [6] IMPLICIT SEQUENCE {
  1721.              flags [0] BIT STRING DEFAULT {},
  1722.              index [1] IMPLICIT INTEGER DEFAULT 0,
  1723.              principal Name
  1724.              }
  1725.  
  1726.    The first 24 bits of flags is a protocol version number and should
  1727.    contain 2.0.0 for clients implementing this version of the spec.
  1728.    Servers implementing this version of the spec should accept any
  1729.    version number of the form 1.x.x or 2.x.x.  The remaining bits are
  1730.    reserved for future use (they should not be supplied by clients and
  1731.    they should be ignored by servers).
  1732.  
  1733.    index is used for continuation (see ReadPrinCertRequest).
  1734.  
  1735.  
  1736.  
  1737.  
  1738. Kaufman                                                        [Page 31]
  1739.  
  1740. RFC 1507                          DASS                    September 1993
  1741.  
  1742.  
  1743.    principal is the name for which certificates are requested.
  1744.  
  1745.  
  1746. 2.3.2.4 ReadOutgoingCertResponse
  1747.  
  1748.    This is the response to a ReadOutgoingCertRequest.  Its syntax is:
  1749.  
  1750.         ReadOutgoingCertResponse::= [7] IMPLICIT SEQUENCE {
  1751.              status [0] IMPLICIT CDCStatus DEFAULT success,
  1752.              index [1] INTEGER OPTIONAL,
  1753.              certSequence [2] IMPLICIT CertSequence,
  1754.              indexInvalidator [3] OCTET STRING (SIZE(8))
  1755.         OPTIONAL,
  1756.              flags [4] BIT STRING OPTIONAL
  1757.              }
  1758.  
  1759.         CertSequence ::= SEQUENCE OF Certificate
  1760.  
  1761.    status indicates success of the cause of failure of the operation.
  1762.  
  1763.    index is used for continuation; see ReadPrinCertRequest.
  1764.  
  1765.    certSequence is the list of parent and outgoing cross certificates.
  1766.  
  1767.    indexInvalidator is used for continuation; see ReadPrinCertResponse
  1768.    (the same rules apply with respect to version numbers).
  1769.  
  1770.    The first 24 bits of flags, if present, contain the protocol version
  1771.    number.  Clients implementing this version of the spec should supply
  1772.    the value 2.0.0.  Servers should accept any values of the form 1.x.x
  1773.    or 2.x.x.  The remaining bits are reserved for future use (they
  1774.    should not be supplied by clients and should be ignored by servers).
  1775.  
  1776. 2.3.2.5 ReadCredentialRequest
  1777.  
  1778.    This request is made to retrieve an principal's encrypted
  1779.    credentials.  To prevent unaudited password guessing, this structure
  1780.    includes an encrypted value that proves that the requester knows the
  1781.    password that will decrypt the structure.  The syntax of the request
  1782.    is:
  1783.  
  1784.         ReadCredentialRequest ::= [2] IMPLICIT SEQUENCE {
  1785.              flags [0] BIT STRING DEFAULT {}
  1786.              principal Name,
  1787.              logindata [2] BIT STRING DEFAULT {},
  1788.              token [3] BIT STRING OPTIONAL
  1789.              }
  1790.  
  1791.  
  1792.  
  1793.  
  1794. Kaufman                                                        [Page 32]
  1795.  
  1796. RFC 1507                          DASS                    September 1993
  1797.  
  1798.  
  1799.    The first 24 bits of flags contains the version number of the
  1800.    protocol.  The value 2.0.0 should be supplied. Any value of the form
  1801.    1.x.x or 2.x.x should be accepted. Any additional bits are reserved
  1802.    for future use (should not be supplied by clients and should be
  1803.    ignored by servers).
  1804.  
  1805.    principal is the name of the principal for whom encrypted credentials
  1806.    are desired.
  1807.  
  1808.    logindata is an encrypted value.  It may only be present if the
  1809.    version number is 2.0.0 or higher.  It must be present to read
  1810.    credentials which are protected by the login agent functionality of
  1811.    the CDC.  It is constructed as a single RSA block encrypted under the
  1812.    public key of the CDC.  The public key of the CDC is learned by some
  1813.    local means.  Possibilities include a local configuration file or by
  1814.    using DASS to read and verify a chain of certificates ending with the
  1815.    CDC [the CDC serving a directory should have its public key listed
  1816.    under a name consisting of the directory name with the RDN
  1817.    "CSS=X509"; the OID for the type CSS is 1.3.24.9.1].  The contents of
  1818.    the block are as follows:
  1819.  
  1820.     - The low order eight bytes contain a randomly generated DES key
  1821.       with the last byte of the DES key placed in the last byte of
  1822.       the RSA block.  This DES key will be used by the CDC to
  1823.       encrypt the response.  Key parity bits are ignored.
  1824.  
  1825.     - The next to last eight bytes contain a long Posix time with
  1826.       the integer time encoded as a byte string using big endian
  1827.       order.
  1828.  
  1829.     - The next eight bytes (from the end) contain a hash of the
  1830.       password.  The algorithm for computing this hash is listed in
  1831.       section 4.4.2.  The CDC never computes this hash; it simply
  1832.       compares the value it receives with the value associated with
  1833.       the credentials.
  1834.  
  1835.     - The next sixteen bytes (from the end) contain zero.
  1836.  
  1837.     - The remainder of the RSA block (which should be the same size
  1838.       as the public modulus of the CDC) contains a random number.
  1839.       The first byte should be chosen to be non-zero but so the
  1840.       value in the block does not exceed the RSA modulus.  Servers
  1841.       should ignore these bits.  This random number need not be of
  1842.       cryptographic strength, but should not be the same value for
  1843.       all encryptions.  Repeating the DES key would be adequate.
  1844.  
  1845.     - The byte string thus constructed is encrypted using the RSA
  1846.       algorithm by treating the string of bytes as a "big endian"
  1847.  
  1848.  
  1849.  
  1850. Kaufman                                                        [Page 33]
  1851.  
  1852. RFC 1507                          DASS                    September 1993
  1853.  
  1854.  
  1855.       integer and treating the integer result as "big endian" to
  1856.       make a string of bytes.
  1857.  
  1858.    token will not be present in the initial implementation but a space
  1859.    is reserved in case some future implementation wants to authenticate
  1860.    and audit the node from which a user is logging in.
  1861.  
  1862. 2.3.2.6 ReadCredentialProtectedResponse
  1863.  
  1864.    This is the second possible response to a ReadPrinLoginRequest.  It
  1865.    is returned when the encrypted credentials are protected from
  1866.    password guessing by the CDC acting as a login agent.  Its syntax is:
  1867.  
  1868.    ReadCredentialProtectedResponse::=[16] IMPLICIT SEQUENCE {
  1869.            status [0] IMPLICIT CDCStatus DEFAULT success,
  1870.            encryptedCredential [1] BIT STRING,
  1871.            flags [2] BIT STRING OPTIONAL
  1872.            }
  1873.  
  1874.    status indicates that the request succeeded or the cause of the
  1875.    failure.
  1876.  
  1877.    encryptedCredential contains the DASSPrivateKey structure (defined in
  1878.    section 4.1) encrypted under a DES key computed from the user's name
  1879.    and password as specified in section 4.4.2 and then reencrypted under
  1880.    the DES key provided in the ReadPrinLoginRequest.
  1881.  
  1882.    The first 24 bits of flags, if present, contains the version number
  1883.    of the protocol.  Implementers of this version of the spec should
  1884.    supply 2.0.0 and should accept any version number of the form 2.x.x.
  1885.    Other bits are reserved for future use (they should not be supplied
  1886.    and they should be ignored).
  1887.  
  1888. 2.3.2.7 WriteCredentialRequest
  1889.  
  1890.    This is a request to update the encrypted credential structure.  It
  1891.    is used when a user's key or password changes.  The syntax of the
  1892.    request is:
  1893.  
  1894.         WriteCredentialRequest ::= [17] IMPLICIT SEQUENCE {
  1895.              flags [0] BIT STRING DEFAULT {},
  1896.              authtoken [2] BIT STRING OPTIONAL,
  1897.              principal [3] Name,
  1898.              logindata [4] BIT STRING DEFAULT {},
  1899.              furtherSensitiveStuff [5] BIT STRING
  1900.              }
  1901.  
  1902.    The first 24 bits of flags is a version number.  Clients implementing
  1903.  
  1904.  
  1905.  
  1906. Kaufman                                                        [Page 34]
  1907.  
  1908. RFC 1507                          DASS                    September 1993
  1909.  
  1910.  
  1911.    this version of the spec should supply 2.0.0.  Servers should accept
  1912.    any value of the form 2.x.x.  Additional bits are reserved for future
  1913.    use (clients should not supply them and servers should ignore them).
  1914.  
  1915.    token, if present, authenticates the entity making the request.  A
  1916.    request will be accepted either from a principal proving knowledge of
  1917.    the password (see logindata below) or a principal presenting a token
  1918.    in this field and satisfying the authorization policy of the CDC.
  1919.    This field need not be present if logindata includes the hash2 of the
  1920.    password (anyone knowing the old password may set a new one).
  1921.  
  1922.    principal is the name of the object for which encrypted credentials
  1923.    should be updated.
  1924.  
  1925.    logindata is encrypted as in ReadPrinLoginRequest.  It proves that
  1926.    the requester knows the old password of the principal to be updated
  1927.    (unless the token supplied is from the user's CA) and includes the
  1928.    key which encrypts furtherSensitiveStuff.
  1929.  
  1930.    furtherSensitiveStuff is an encrypted field constructed as follows:
  1931.  
  1932.     - The first eight bytes consist of the hash2 defined in section
  1933.       4.4.2 with the last byte of the hash2 value stored first.  The
  1934.       CDC stores this value and compares it with the values supplied
  1935.       in future requests of ReadCredentialRequest and
  1936.       WriteCredentialRequest.
  1937.  
  1938.     - The next (variable number of) bytes contains a DASSPrivateKey
  1939.       structure (defined in section 4.1).  This is the new
  1940.       credential structure that will be returned by the CDC on
  1941.       future ReadCredentialRequests.
  1942.  
  1943.     - The result is padded with zero bytes to a multiple of eight
  1944.       bytes.
  1945.  
  1946.     - The entire padded string is encrypted using the key from
  1947.       logindata or token using DES in CBC mode with zero IV.
  1948.  
  1949.    the new eight byte "hash2" defined in section 4.4.2 concatenated with
  1950.    the DASSPrivateKey structure encrypted under the new "hash1" all
  1951.    encrypted under the DES key included in logindata.
  1952.  
  1953. 2.3.2.8 HereIsStatus
  1954.  
  1955.    This is the response message to ill-formed requests and requests that
  1956.    only return a status and no data.  It's syntax is:
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Kaufman                                                        [Page 35]
  1963.  
  1964. RFC 1507                          DASS                    September 1993
  1965.  
  1966.  
  1967.         HereIsStatus ::= [1] IMPLICIT SEQUENCE {
  1968.              status [0] IMPLICIT CDCStatus DEFAULT success
  1969.              }
  1970.  
  1971.    status indicates success or the cause of the failure.
  1972.  
  1973. 2.3.2.9 Status Codes
  1974.  
  1975.    The following are the CDCStatus codes that can be returned by
  1976.    servers.  Not all of these values are possible with all calls, and
  1977.    some of the status codes are not possible with any of the calls
  1978.    described in this document.
  1979.  
  1980.         CDCStatus ::= INTEGER {
  1981.  
  1982.              success(0),
  1983.              accessDenied(1),
  1984.  
  1985.              wrongCDC(2),     --this CDC does not store the
  1986.                               --requested information
  1987.  
  1988.              unrecognizedCA(3),
  1989.              unrecognizedPrincipal(4),
  1990.  
  1991.              decodeRequestError(5),--invalid BER
  1992.              illegalRequest(6),    --request not recognised
  1993.  
  1994.              objectDoesNotExist(7),
  1995.              illegalAttribute(8),
  1996.  
  1997.              notPrimaryCDC(9),--write requests not accepted
  1998.                               --at this CDC replica
  1999.  
  2000.              authenticationFailure(11),
  2001.              incorrectPassword(12),
  2002.  
  2003.              objectAlreadyExists(13),
  2004.              objectWouldBeOrphan(15),
  2005.  
  2006.              objectIsPermanent(16),
  2007.  
  2008.              objectIsTentative(17),
  2009.              parentIsTentative(18),
  2010.  
  2011.              certificateNotFound(19),
  2012.              attributeNotFound(20),
  2013.  
  2014.              ioErrorOnCertifDatabase(100),
  2015.  
  2016.  
  2017.  
  2018. Kaufman                                                        [Page 36]
  2019.  
  2020. RFC 1507                          DASS                    September 1993
  2021.  
  2022.  
  2023.              databaseFull(101),
  2024.  
  2025.              serverInternalError(102),
  2026.              serverFatalError(103),
  2027.  
  2028.              insufficientResources(104)
  2029.              }
  2030.  
  2031. 3. Services Provided
  2032.  
  2033.    This section specifies the services provided by DASS in terms of
  2034.    abstract interfaces and a model implementation.  A particular
  2035.    implementation may support only a subset of these services and may
  2036.    provide them through interfaces which combine functions and supply
  2037.    some parameters implicitly. The specific calling interfaces are in
  2038.    some cases language and operating system specific.  An actual
  2039.    implementation may choose, for example, to structure interfaces so
  2040.    that security contexts are established and then passed implicitly in
  2041.    calls rather than explicitly including them in every call.  It might
  2042.    also bundle keys into opaque structures to be used with supplied
  2043.    encryption and decryption routines in order to enhance security and
  2044.    modularity and better comply with export regulations. Annex B
  2045.    describes a Portable API designed so that applications using a
  2046.    limited subset of the capabilities of DASS can be easily ported
  2047.    between operating systems and between DASS and Kerberos based
  2048.    environments.  The model implementation describes data structures
  2049.    which include cached values to enhance performance.  Implementations
  2050.    may choose different contents or different caching strategies so long
  2051.    as the same sequence of calls would produce the same output for some
  2052.    caching policy.
  2053.  
  2054.    DASS operates on four kinds of data structures: Certificates,
  2055.    Credentials, Tokens, and Certification Authority State.  Certificates
  2056.    and Tokens are passed between implementations and thus their exact
  2057.    format must be architecturally specified. This detailed bit-for-bit
  2058.    specification is in section 4. Credentials generally exist only
  2059.    within a single node and their format is therefore not specified
  2060.    here. The contents of all of these data structures is listed below
  2061.    followed by the algorithms for manipulating them.
  2062.  
  2063.    There are three kinds of services provided by DASS: Certificate
  2064.    Maintenance, Credential Maintenance, and Authentication. The first
  2065.    two kinds exist only in support of the third. Certificate maintenance
  2066.    functions maintain the database of public keys in the naming service.
  2067.    These functions tend to be fairly specialized and may not be
  2068.    supported on all platforms. Before authentication can take place,
  2069.    both authenticating principals must have constructed credentials
  2070.    structures. These are built using the Credential Maintenance calls.
  2071.  
  2072.  
  2073.  
  2074. Kaufman                                                        [Page 37]
  2075.  
  2076. RFC 1507                          DASS                    September 1993
  2077.  
  2078.  
  2079.    The Authentication functions use credential information and
  2080.    certificates, produce and consume authentication tokens and tell the
  2081.    two communicating parties one another's names.
  2082.  
  2083. 3.1 Certificate Contents
  2084.  
  2085.    For purposes of this architecture, a certificate is a data structure
  2086.    posted in the naming service which proclaims that knowledge of the
  2087.    private key associated with a stated public key authenticates a named
  2088.    principal. Certificates are "signed" by some authority, are readable
  2089.    by anyone, and can be verified by anyone knowing the public key of
  2090.    the authority.  DASS organizes the CA trust hierarchy around the
  2091.    naming hierarchy. There exists a trusted authority associated with
  2092.    each directory in the naming hierarchy. Generally, each authority
  2093.    creates certificates stating the public keys of each of its children
  2094.    (in the naming hierarchy) and the public key of its parent (in the
  2095.    naming hierarchy). In this way, anyone knowing the public key of any
  2096.    authority can learn the public key of any other by "walking the
  2097.    tree". In order that principals may authenticate even when all of
  2098.    their ancestor directories do not participate in DASS, authorities
  2099.    may also create "cross-certificates" which certify the public key of
  2100.    a named entity which is not a descendent.  Rules for finding and
  2101.    following these cross-certificates are described in the Get_Pub_Keys
  2102.    routines.  Every principal is expected to know the public key of the
  2103.    CA of the directory in which it is named. This must be securely
  2104.    learned when the principal is initialized and may be maintained in
  2105.    some form of local storage or by having the principal sign a
  2106.    certificate listing the name and public key of its parent and posting
  2107.    that certificate in the naming service.
  2108.  
  2109.    The syntax and content of DASS certificates are defined in terms of
  2110.    X.509 (Directory - Authentication Framework).  While that standard
  2111.    prescribes a single syntax for certificates, DASS considers
  2112.    certificates to be of one of six types:
  2113.  
  2114.     - Normal Principal certificates are signed by a CA and certify
  2115.       the name and public key of a principal where the name of the
  2116.       CA is a prefix of the name of the principal and is one
  2117.       component shorter.
  2118.  
  2119.     - Trusted Authority certificates are signed by an ordinary
  2120.       principal and certify the name and public key of the
  2121.       principal's CA (i.e., the CA whose name is a prefix of the
  2122.       principal's name and is one component shorter).
  2123.  
  2124.     - Child certificates are signed by a CA and certify the name and
  2125.       public key of a CA of a descendent directory (i.e., where the
  2126.       name of the issuing CA is a prefix of the name of the subject
  2127.  
  2128.  
  2129.  
  2130. Kaufman                                                        [Page 38]
  2131.  
  2132. RFC 1507                          DASS                    September 1993
  2133.  
  2134.  
  2135.       CA and is one component shorter).
  2136.  
  2137.     - Parent certificates are signed by a CA and certify the name
  2138.       and public key of the CA of its parent directory (i.e., whose
  2139.       name is a prefix of the name of the issuer and is one
  2140.       component shorter).
  2141.  
  2142.     - Cross certificates are signed by a CA and certify the name and
  2143.       public key of a CA of a directory where neither name is a
  2144.       prefix of the other.
  2145.  
  2146.     - Self certificates are signed by a principal or a CA and the
  2147.       issuer and subject name are the same.  They are not used in
  2148.       this version of the architecture but are defined as a
  2149.       convenient data structure in which in which implementations
  2150.       may insecurely pass public keys and they may be used in the
  2151.       future in certain key roll-over procedures.
  2152.  
  2153.    It is intended that some future version of the architecture relax the
  2154.    restrictions above where prefixes must be one component shorter.
  2155.    Being able to handle certificates where prefixes are two or more
  2156.    components shorter complicates the logic of treewalking somewhat and
  2157.    is not immediately necessary, so such certificates are disallowed for
  2158.    now.
  2159.  
  2160.    The syntax of certificates is defined in section 4. For purposes of
  2161.    the algorithms which follow, the following is the portion of the
  2162.    content which is used (names in brackets refer to the field names in
  2163.    the ASN.1 encoded structure):
  2164.  
  2165.     - UID of the issuer (optional)
  2166.  
  2167.     - Full name of the issuer (the authority or principal signing)
  2168.       [issuer]
  2169.  
  2170.     - UID of the subject (optional)
  2171.  
  2172.     - Full name of the subject (the authority or principal whose key
  2173.       is being certified) [subject]
  2174.  
  2175.     - Public Key of the subject [subjectPublicKey]
  2176.  
  2177.     - Period of validity (effective date and expiration date)
  2178.       [valid]
  2179.  
  2180.     - Signature over the entire content of the certificate created
  2181.       using the private key of the issuer.
  2182.  
  2183.  
  2184.  
  2185.  
  2186. Kaufman                                                        [Page 39]
  2187.  
  2188. RFC 1507                          DASS                    September 1993
  2189.  
  2190.  
  2191.    When parsing a certificate, the reader compares the two name fields
  2192.    to determine what type of certificate it is. For Parent and Trusted
  2193.    Authority certificates, the names are ignored for purposes of all
  2194.    further processing. For Child and Normal Principal certificates, only
  2195.    the suffix by which the child's name is longer than the parent's is
  2196.    used for further processing. The reason for this is so that if a
  2197.    branch of the namespace is renamed, all of the certificates in the
  2198.    moved branch remain valid for purposes of DASS processing. The only
  2199.    purposes of having full names in these certificates are (1) to comply
  2200.    with X.509, (2) for possible interoperability with other
  2201.    architectures using different algorithms, and (3) to allow principals
  2202.    to securely store their own names in trusted authority certificates
  2203.    in the case where they do not have enough local storage to keep it.
  2204.  
  2205. 3.2 Encrypted Private Key Structure
  2206.  
  2207.    In order that humans need only remember a password rather than a full
  2208.    set of credentials, and also to make installation of nodes and
  2209.    servers easier, there is a defined format for encrypting RSA secrets
  2210.    under a password and posting in the naming service. This structure
  2211.    need only exist when passwords are used to protect RSA secrets; for
  2212.    servers which keep their secrets in non-volatile memory or users who
  2213.    carry smart cards, they are unnecessary.
  2214.  
  2215.    This structure includes the RSA private/public key pair encrypted
  2216.    under a DES key. The DES key is computed as a one-way hash of the
  2217.    password.  This structure also optionally includes the UID of the
  2218.    principal.  It is needed only if a single RSA key is shared by
  2219.    multiple principals (with multiple UIDs).
  2220.  
  2221.    Since this structure is posted in the name service and may be used by
  2222.    multiple implementations, its format must be architecturally defined.
  2223.    The exact encoding is listed in section 4.
  2224.  
  2225. 3.3 Authentication Tokens
  2226.  
  2227.    This section of the document defines the contents of the
  2228.    authentication tokens which are produced and consumed by Create_token
  2229.    and Accept_token. With DASS, the token passed from the client to the
  2230.    server is complex, with a large number of optional parts, while the
  2231.    token passed from server to client (in the case of mutual
  2232.    authentication only) is small and simple.
  2233.  
  2234.    The authentication token potentially contains a large number of
  2235.    parts, most of which are optional depending on the type of
  2236.    authentication. The following defines the content and purpose of each
  2237.    of the parts, but does not describe the actual encoding (in the
  2238.    belief that such details would be distracting). The encoding is in
  2239.  
  2240.  
  2241.  
  2242. Kaufman                                                        [Page 40]
  2243.  
  2244. RFC 1507                          DASS                    September 1993
  2245.  
  2246.  
  2247.    section 4.
  2248.  
  2249.    The authentication process begins when the initiator calls
  2250.    Create_token with the name of the target. This routine returns an
  2251.    authentication token, which is sent to the target. The target calls
  2252.    Accept_token passing it the token. Both routines produce a second
  2253.    "mutual authentication token". The target returns this to the
  2254.    initiator to prove that it received the token.
  2255.  
  2256. 3.3.1 Initial Authentication Token
  2257.  
  2258.    The components of the initial authentication token are (names in
  2259.    brackets refer to the field names within the ASN.1 encoded structures
  2260.    defined in section 4):
  2261.  
  2262.     a) Encrypted Shared Key - [authenticatingKey] - This is a Shared
  2263.        (DES) key encrypted under the public key of the target. Also
  2264.        included in the encrypted structure is a validity interval and
  2265.        a recognizable pattern so that the receiver can tell whether
  2266.        the decryption was successful.
  2267.  
  2268.     b) Login Ticket - [sourcePrincipal.userTicket] - This is a
  2269.        "delegation certificate" signed by a principal's long term
  2270.        private key delegating to a short term public key. Its "active
  2271.        ingredients" are:
  2272.  
  2273.       1) UID of delegating principal [subjectUID]
  2274.  
  2275.       2) Period of validity [validity]
  2276.  
  2277.       3) Delegation public key [delegatingPublicKey]
  2278.  
  2279.       4) Signature by private key of principal
  2280.          The existence of this signature is testimony that the
  2281.          private key corresponding to the delegation public key
  2282.          speaks for the user during the validity interval.
  2283.          This data structure is optional and will be missing if the
  2284.          authentication is only on behalf of a Local Username on a
  2285.          node (i.e., proxy) rather than on behalf of a real principal
  2286.          with a real key.
  2287.  
  2288.     c) Shared Key Ticket - [sourcePrincipal.sharedKeyTicketSignature]
  2289.        - This is a signature of the Encrypted Shared Key by the
  2290.        Delegation Public key in the Login Ticket.  The existence of
  2291.        this signature is testimony that  the DES key in the encrypted
  2292.        shared key speaks for the user.
  2293.  
  2294.        This data structure is optional and will be missing if the
  2295.  
  2296.  
  2297.  
  2298. Kaufman                                                        [Page 41]
  2299.  
  2300. RFC 1507                          DASS                    September 1993
  2301.  
  2302.  
  2303.        authentication is only on behalf of a Local Username on a node
  2304.        (i.e., proxy) rather than on behalf of a real principal with a
  2305.        real key. It will also be missing if delegation is taking
  2306.        place.
  2307.  
  2308.     d) Node Ticket - [sourceNode.nodeTicketSignature] - This is a
  2309.        signature of the Encrypted Shared key and a "Local Username"
  2310.        on the host node by the node's private key.  The existence of
  2311.        this signature is testimony by the node that the DES key in
  2312.        the encrypted shared key speaks for the named account on that
  2313.        node.
  2314.  
  2315.     e) Delegator - [sourcePrincipal.delegator] - This data structure
  2316.        contains the private login key encrypted under the Shared key.
  2317.        It is optional and is present only if the initiator is
  2318.        delegating to the destination.
  2319.  
  2320.     f) Authenticator - [authenticatorData] - This data structure
  2321.        contains a timestamp and a message digest of the channel
  2322.        bindings signed by the Shared Key. It is always present.
  2323.  
  2324.     g) Principal name - [sourcePrincipal.userName] - This is the name
  2325.        of the initiating principal. It is optional and will be
  2326.        missing for strong proxy where bits on the wire are at a
  2327.        premium and where the destination is capable of independently
  2328.        constructing the name.
  2329.  
  2330.     h) Node name - [sourceNode.nodeName] - This is the name of the
  2331.        initiating node. It is optional and will be missing for strong
  2332.        proxy where bits on the wire are at a premium and the name is
  2333.        present elsewhere in the message being passed.
  2334.  
  2335.     i) Local Username - [sourceNode.username] - This is the local
  2336.        user name on the initiating node. It is optional and will be
  2337.        missing for strong proxy where bits on the wire are at a
  2338.        premium and where the name is present elsewhere in the message
  2339.        being passed.
  2340.  
  2341. 3.3.2 Mutual Authentication Token
  2342.  
  2343.    The authentication buffer sent from the target to the initiator (in
  2344.    the case of mutual authentication) is much simpler. It contains only
  2345.    the timestamp taken from the authenticator encrypted under the Shared
  2346.    Key.  It is ASN.1 encoded to allow for future extensions.
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354. Kaufman                                                        [Page 42]
  2355.  
  2356. RFC 1507                          DASS                    September 1993
  2357.  
  2358.  
  2359. 3.4 Credentials
  2360.  
  2361.    DASS organizes its internal state with Credentials structures.  There
  2362.    are many kinds of information which can be stored in credentials.
  2363.    Rather than making a different kind of data structure for each kind
  2364.    of data, DASS provides a single credentials structure where most of
  2365.    its fields are optional.  Operating systems must provide some
  2366.    mechanism for having several processes share credentials. An example
  2367.    of a mechanism for doing this would be for credentials to be stored
  2368.    in a file and the name of the file is used as a "handle" by all
  2369.    processes which use those credentials. Some of the calls which follow
  2370.    cause credentials structures to be updated. It is important to the
  2371.    performance of a system that updates to credentials (such as occur
  2372.    during the routines Verify_Principal_Name and Verify_Node_Name, where
  2373.    the caches are updated) be visible to all processes sharing those
  2374.    credentials.
  2375.  
  2376.    In many of the calls which follow, the credentials passed may be
  2377.    labeled: claimant credentials, verifier credentials or some such.
  2378.    This indicates whose credentials are being passed rather than a type
  2379.    of credentials. DASS supports only one type of credentials, though
  2380.    the fields present in the credentials of one sort of principal may be
  2381.    quite different from those present in the credentials of another.
  2382.  
  2383.    An implementation may choose to support multiple kinds of credentials
  2384.    structures each of which will support only a subset of the functions
  2385.    available if it is not implementing the full architecture.  This
  2386.    would be the case, for example, if an implementation did not support
  2387.    the case where a server both received requests from other principals
  2388.    and made requests on its own behalf using a single set of
  2389.    credentials.
  2390.  
  2391.    The following are a list of the fields that may be contained in a
  2392.    credentials structure. They are grouped according to common usage.
  2393.  
  2394. 3.4.1 Claimant information
  2395.  
  2396.    This is the information used when the holder of these credentials is
  2397.    requesting something. It includes:
  2398.  
  2399.     a) Full X.500 name of the principal
  2400.  
  2401.     b) Public Key of the principal
  2402.  
  2403.     c) Login Ticket - a login ticket contains:
  2404.  
  2405.       1) the UID of the principal
  2406.  
  2407.  
  2408.  
  2409.  
  2410. Kaufman                                                        [Page 43]
  2411.  
  2412. RFC 1507                          DASS                    September 1993
  2413.  
  2414.  
  2415.       2) a period of validity (effective date & expiration date)
  2416.  
  2417.       3) a delegation public key
  2418.  
  2419.       4) a signature of the ticket contents by the principal's long
  2420.          term key
  2421.  
  2422.     d) Delegation Private Key (corresponding to the public key in c3)
  2423.  
  2424.     e) Encrypted Shared Key (present only when credentials were
  2425.        created by accept_token; this information is needed to verify
  2426.        a node ticket after credentials are accepted)
  2427.  
  2428. 3.4.2 Verifier information
  2429.  
  2430.    This is the information needed by a server to decrypt incoming
  2431.    requests. It is also used by generate_server_ticket to generate a
  2432.    login ticket.
  2433.  
  2434.     a) RSA private key.
  2435.  
  2436. 3.4.3 Trusted Authority
  2437.  
  2438.    This is information used to seed the walk of the CA hierarchy to
  2439.    reliably find the public key(s) associated with a name.
  2440.    Normally, the trusted authority in a set of credentials will be
  2441.    the directory parent of the principal named in Claimant
  2442.    information.  In some circumstances, it may instead be the
  2443.    directory parent of the node on which the credentials reside.
  2444.  
  2445.     a) Full X.500 name of a CA
  2446.  
  2447.     b) Corresponding RSA Public Key
  2448.  
  2449.     c) Corresponding UID
  2450.  
  2451. 3.4.4 Remote node authentication
  2452.  
  2453.    This information is present only for credentials generated by
  2454.    "Accept_token". It includes information about any remote node which
  2455.    vouched for the request.
  2456.  
  2457.     a) Full X.500 name of the node
  2458.  
  2459.     b) Local Username on the node
  2460.  
  2461.     c) Node ticket.
  2462.  
  2463.  
  2464.  
  2465.  
  2466. Kaufman                                                        [Page 44]
  2467.  
  2468. RFC 1507                          DASS                    September 1993
  2469.  
  2470.  
  2471. 3.4.5 Local node credentials
  2472.  
  2473.    This information is added by Combine_credentials, and is used by
  2474.    Create_token to add a node signature to outbound requests.
  2475.  
  2476.     a) Full X.500 name of the node
  2477.  
  2478.     b) Local Username on the node
  2479.  
  2480.     c) RSA private key of the node
  2481.  
  2482. 3.4.6 Cached outgoing contexts
  2483.  
  2484.    There may be one (or more) such structures for each server for which
  2485.    this principal has created authentication tokens. These represent a
  2486.    cache: they may be discarded at any time with no effect except on
  2487.    performance. For each association, the following information is kept:
  2488.  
  2489.     a) Destination RSA Public Key (index)
  2490.  
  2491.     b) Encrypted Shared key
  2492.  
  2493.     c) Shared Key Ticket (optional, included if there has been a
  2494.        non-delegating connection)
  2495.  
  2496.     d) Node Ticket
  2497.  
  2498.     e) Delegator (optional, included if there has been a delegating
  2499.        connection)
  2500.  
  2501.     f) Validity interval
  2502.  
  2503.     g) Shared Key
  2504.  
  2505. 3.4.7 Cached Incoming Contexts
  2506.  
  2507.    There may be one such structure for each client from which this server
  2508.    has received an authentication token.  These represent a cache: they
  2509.    may be discarded at any time with no effect except on performance. (An
  2510.    implementation may choose to keep one System-wide Cache (and list of
  2511.    incoming timestamps). While it is unlikely that the same Encrypted
  2512.    Shared Key will result from encryption of Shared keys generated by
  2513.    different clients or for different servers, an implementation must
  2514.    ensure that an entry made for one client/server can not be reused by
  2515.    another client/server.  Similarly an implementation may choose to keep
  2516.    separate caches for the Shared Key/Validity Interval/Delegation Public
  2517.    Key, the Nodename/UID/key/username and the Principal name/UID/key.)
  2518.    For each association, the following information is kept:
  2519.  
  2520.  
  2521.  
  2522. Kaufman                                                        [Page 45]
  2523.  
  2524. RFC 1507                          DASS                    September 1993
  2525.  
  2526.  
  2527.     a) Encrypted Shared key (index)
  2528.  
  2529.     b) Shared Key
  2530.  
  2531.     c) Validity Interval
  2532.  
  2533.     d) Full X.500 name of Client Principal
  2534.  
  2535.     e) UID of Client Principal
  2536.  
  2537.     f) Public Key of Client Principal
  2538.  
  2539.     g) Name of Client Node
  2540.  
  2541.     h) UID of Client Node
  2542.  
  2543.     i) Public Key of Client Node
  2544.  
  2545.     j) Local Username on Client node
  2546.  
  2547.     k) Delegation Public key of Client Principal's Login Ticket
  2548.  
  2549.    The Name, UID and Public key of the Principal are all entered
  2550.    together once the Login Ticket has been verified. Similarly the Node
  2551.    name, Node key and Username are entered together once the Node Ticket
  2552.    has been verified. These pieces of information are only present if
  2553.    they have been verified.
  2554.  
  2555. 3.4.8 Received Authenticators
  2556.  
  2557.    A record of all the authenticators received is kept. This is used to
  2558.    detect replayed messages. (This list must be common to all targets
  2559.    that could accept the same authenticator (channel bindings will
  2560.    prevent other targets from accepting the same authenticator). This
  2561.    includes different `servers' sharing the same key.)  The entries in
  2562.    this list may be deleted when the timestamp is old enough that they
  2563.    would no longer be accepted. This list is kept separate from the
  2564.    Cached incoming context in order that the information in the cached
  2565.    incoming context can be discarded at any time. An implementation
  2566.    could choose to save these timestamps with the cached incoming
  2567.    context if it ensures that it can never purge entries from the cache
  2568.    before the timestamp has aged sufficiently. This list is accessed
  2569.    based on an extract from the signature from the Authenticator. The
  2570.    extract must be at least 64 bits, to ensure that it is very unlikely
  2571.    that 2 authenticators will be received with matching signatures.
  2572.  
  2573.     a) Extract from Signature from Authenticator
  2574.  
  2575.  
  2576.  
  2577.  
  2578. Kaufman                                                        [Page 46]
  2579.  
  2580. RFC 1507                          DASS                    September 1993
  2581.  
  2582.  
  2583.     b) Timestamp
  2584.  
  2585.    If an implementation runs out of space to store additional
  2586.    authenticators, it may either reject the token which would have
  2587.    overflowed the table or it may temporarily narrow the allowed clock
  2588.    skew to allow it to free some of the space used to hold "old"
  2589.    authenticators.  The first strategy will always falsely reject
  2590.    tokens; the second may cause false rejection of tokens if the allowed
  2591.    clock skew gets narrowed beyond the actual clock skew in the network.
  2592.  
  2593. 3.5 CA State
  2594.  
  2595.    The CA needs to maintain some internal state in order to generate
  2596.    certificates. This internal state must be protected at all times, and
  2597.    great care must be taken to prevent its being disclosed. A CA may
  2598.    choose to maintain additional state information in order to enhance
  2599.    security.  In particular, it is the responsibility of the CA to
  2600.    assure that the same UID is not serially reused by two holders of a
  2601.    single name.  In most cases, this can be done by creating the UID at
  2602.    the time the user is registered.  To securely permit users to keep
  2603.    their UIDs when transferring from another CA, the CA must keep a
  2604.    record of any UIDs used by previous holders of the name. Since
  2605.    actions of a CA are so security sensitive, the CA should also
  2606.    maintain an audit trail of all certificates signed so that a history
  2607.    can be reconstructed in the event of a compromise.  Finally, for the
  2608.    convenience of the CA operator, the CA should record a list of the
  2609.    directories for which it is responsible and their UIDs so that these
  2610.    need not be entered whenever the CA is to be used.  The state
  2611.    includes at least the following information:
  2612.  
  2613.     - Public Key of CA
  2614.  
  2615.     - Private Key of CA
  2616.  
  2617.     - Serial number of next certificate to be issued
  2618.  
  2619. 3.6 Data types used in the routines
  2620.  
  2621.    There are several abstract data types used as parameters to the
  2622.    routines described in this section. These are listed here
  2623.  
  2624.     a) Integer
  2625.  
  2626.     b) Name
  2627.        Names unless otherwise noted are always X.500 names.  While
  2628.        most of the design of DASS is naming service independent, the
  2629.        syntax of certificates and tokens only permits X.500 names to
  2630.        be used.  If DASS is to be used in an environment where some
  2631.  
  2632.  
  2633.  
  2634. Kaufman                                                        [Page 47]
  2635.  
  2636. RFC 1507                          DASS                    September 1993
  2637.  
  2638.  
  2639.        other form of name is used, those names must be translated
  2640.        into something syntactically compliant with X.500 using some
  2641.        mechanism which is beyond the scope of this architecture.  The
  2642.        only other form of name appearing in this architecture is a
  2643.        "local user name", which corresponds to the simple name of an
  2644.        "account" on a node.  As a type, such names appear in
  2645.        parameter lists as "Strings".
  2646.  
  2647.     c) String
  2648.        A String is a sequence of printable characters.
  2649.  
  2650.     d) Absolute Time
  2651.        A UTC time. The precision of these Times is not stated. A
  2652.        precision of the order of one second in all times is
  2653.        sufficient.
  2654.  
  2655.     e) Time Interval
  2656.        A Time interval is composed of 2 times. A Start Time and an
  2657.        End Time, both of which are Absolute Times
  2658.  
  2659.     f) Timestamp
  2660.        A Timestamp is a time in POSIX format. I.e., two 32 bit
  2661.        Integers. The first representing seconds, and the second
  2662.        representing nanoseconds.
  2663.  
  2664.     g) Duration
  2665.        A Duration is the length of a time interval.
  2666.  
  2667.     h) Octet String
  2668.        A sequence of bytes containing binary data
  2669.  
  2670.     i) Boolean
  2671.        A value of either True or False
  2672.  
  2673.     j) UID
  2674.        A UID is an bit string of 128 bits.
  2675.  
  2676.     k) OID
  2677.        An OID is an ISO Object Identifier.
  2678.  
  2679.     l) Shared key
  2680.        A Shared key is a DES key, a sequence of 8 bytes
  2681.  
  2682.     m) CA State
  2683.        A structure of the form described in '3.5
  2684.  
  2685.     n) Credentials
  2686.        A structure of the form described in '3.4
  2687.  
  2688.  
  2689.  
  2690. Kaufman                                                        [Page 48]
  2691.  
  2692. RFC 1507                          DASS                    September 1993
  2693.  
  2694.  
  2695.     o) Certificate
  2696.        An ASN.1 encoding of the structure described in '3.1
  2697.  
  2698.     p) Authentication Token
  2699.        An ASN.1 encoding of the structure described in '3.3.1
  2700.  
  2701.     q) Mutual Authentication Token
  2702.        An ASN.1 encoding of the structure described in '3.3.2
  2703.  
  2704.     r) Encrypted Credentials
  2705.        An ASN.1 encoding of  the  structure described in '3.2
  2706.  
  2707.     s) Public key
  2708.        A representation of an RSA Public key, including all the
  2709.        information needed to encode the public key in a certificate.
  2710.  
  2711.     t) Set of Public key/UID pairs
  2712.        A set of Public key/UID pairs. This Data type is only used
  2713.        internally in DASS - it does not appear in any interface used
  2714.        to other architectures.
  2715.  
  2716. 3.7 Error conditions
  2717.  
  2718.    These routines can return the following error conditions (an
  2719.    implementation may indicate errors with more or less precision):
  2720.  
  2721.     a) Incomplete chain of trustworthy CAs
  2722.  
  2723.     b) Target has no keys which can be trusted.
  2724.  
  2725.     c) Invalid Authentication Token
  2726.  
  2727.     d) Login Ticket Expired
  2728.  
  2729.     e) Invalid Password
  2730.  
  2731.     f) Invalid Credentials
  2732.  
  2733.     g) Invalid Authenticator
  2734.  
  2735.     h) Duplicate Authenticator
  2736.  
  2737. 3.8 Certificate Maintenance Functions
  2738.  
  2739.    Authentication services depend on a set of data structures maintained
  2740.    in the naming service. There are two kinds of information:
  2741.    Certificates, which associate names and public keys and are signed by
  2742.    off-line Certification Authorities; and Encrypted Credentials, which
  2743.  
  2744.  
  2745.  
  2746. Kaufman                                                        [Page 49]
  2747.  
  2748. RFC 1507                          DASS                    September 1993
  2749.  
  2750.  
  2751.    contain RSA Private Keys and certain context information encrypted
  2752.    under passwords. Encrypted Credentials are only necessary in
  2753.    environments where passwords are used. Credentials may alternatively
  2754.    be stored in some other secure manner (for example on a smart card).
  2755.  
  2756.    The certificate maintenance services are designed so that the most
  2757.    sensitive - the actual signing of certificates - may be done by an
  2758.    off-line authority.  Once signed, certificates must be posted in the
  2759.    naming service to be believed.  The precise mechanisms for moving
  2760.    certificates between off-line CAs and the on-line naming service are
  2761.    implementation dependent.  For the off-line mechanisms to provide any
  2762.    actual security, the CAs must be told what to sign in some reliable
  2763.    manner.  The mechanisms for doing this are implementation dependent.
  2764.    The abstract interface says that the CA is given all of the
  2765.    information that goes into a certificate and it produces the signed
  2766.    certificate.  There are requirements surrounding the auditing of a
  2767.    CA's actions. The details of what actions are audited, where the
  2768.    audit trail is maintained, and what utilities exist to search that
  2769.    audit trail are not specified here. The functions a CA must provide
  2770.    are:
  2771.  
  2772. 3.8.1 Install CA
  2773.  
  2774.    Install_CA(
  2775.                        keysize               Integer,   --inputs
  2776.                        CA_state              CA State,  --outputs
  2777.                        CA_Public_Key         Public Key)
  2778.  
  2779.    This routine need only generate a public/private key pair of the
  2780.    requested size. Keysize is likely to be in implementation constant
  2781.    rather than a parameter.  The value is likely to be either 512 or
  2782.    640.  Key sizes throughout will have to increase over time as
  2783.    factoring technology and CPU speeds improve.  Both keys are stored as
  2784.    part of the CA_state; the public key is returned so that other CAs
  2785.    may cross-certify this one. The `Next Serial number' in the CA state
  2786.    is set to 1.
  2787.  
  2788. 3.8.2 Create Certificate
  2789.  
  2790.    Create_certificate(
  2791.                                                     --inputs
  2792.                        Renewal               Boolean,
  2793.                        Include_UID           Boolean,
  2794.                        Issuer_name           Name,
  2795.                        Issuer_UID            UID,
  2796.                        Effective_date        Absolute Time,
  2797.                        Expiration_date       Absolute Time,
  2798.                        Subject_name          Name,
  2799.  
  2800.  
  2801.  
  2802. Kaufman                                                        [Page 50]
  2803.  
  2804. RFC 1507                          DASS                    September 1993
  2805.  
  2806.  
  2807.                        Subject_UID           UID,
  2808.                        Subject_public_key    Public Key,
  2809.                                                     --updated
  2810.                        CA_state              CA State,
  2811.                                                     --outputs
  2812.                        Certificate           Certificate)
  2813.  
  2814.    This procedure creates and signs a certificate.  Note that the
  2815.    various contents of the certificate must be communicated to the CA in
  2816.    some reliable fashion.  The Issuer_name and UID are the name and UID
  2817.    of the directory on whose behalf the certificate is being signed.
  2818.  
  2819.    This routine formats and signs a certificate with the private key in
  2820.    CA_state. It audits the creation of the certificate and updates the
  2821.    sequence number which is part of CA_state. The Issuer and Subject
  2822.    names are X.500 names.  If the CA state includes a history of what
  2823.    UIDs have previously been used by what names, this call will only
  2824.    succeed in the collision case if the Renewal boolean is set true.  If
  2825.    the Include_UID boolean is set true, this routine will generate a
  2826.    1992 format X.509 certificate; otherwise it will generate a 1988
  2827.    format X.509 certificate.
  2828.  
  2829. 3.8.3 Create Principal
  2830.  
  2831.    Create_principal(
  2832.                                                     --inputs
  2833.                        Password              String,
  2834.                        keysize               Integer,
  2835.                        Principal_name        Name,
  2836.                        Principal_UID         UID,
  2837.                        Parent_Public_key     Public Key,
  2838.                        Parent_UID            UID,
  2839.                                                     --outputs
  2840.                        Encrypted_Credentials Encrypted Credentials,
  2841.                        Trusted_authority_certificate Certificate)
  2842.  
  2843.    This procedure creates a new principal by generating a new
  2844.    public/private key pair, encrypting the public and private keys under
  2845.    the password, and signing a trusted authority certificate for the
  2846.    parent CA.  In an implementation not using passwords (e.g., smart
  2847.    cards), an alternative mechanism must be used for initially creating
  2848.    principals.  If a principal has protected storage for trusted
  2849.    authority information, it is not necessary to create a trusted
  2850.    authority certificate and store it in the naming service.  Some
  2851.    procedure analogous to this one must be executed, however, in which
  2852.    the principal learns the public key and UID of its CA and its own
  2853.    name.
  2854.  
  2855.  
  2856.  
  2857.  
  2858. Kaufman                                                        [Page 51]
  2859.  
  2860. RFC 1507                          DASS                    September 1993
  2861.  
  2862.  
  2863.    This routine creates two output structures with the following steps:
  2864.  
  2865.     a) Generate a public/private key pair using the indicated
  2866.        keysize. An implementation will likely fix the keysize as an
  2867.        implementation constant, most likely 512 or 640 bits, rather
  2868.        than accepting it as a parameter.  Key sizes generally will
  2869.        have to increase over time as factoring technology and CPU
  2870.        speeds improve.
  2871.  
  2872.     b) Form the encrypted credentials by using the public key,
  2873.        private key, and Principal_UID and encrypting them using a
  2874.        hash of the password as the key.
  2875.  
  2876.     c) Generate a trusted authority certificate (which is identical
  2877.        in format to a "parent" certificate) getting fields as
  2878.        follows:
  2879.  
  2880.       1) Certificate version is X.509 1992.
  2881.  
  2882.       2) Issuer name is the Principal name (which is an X.500 name).
  2883.  
  2884.       3) Issuer UID is the Principal UID.
  2885.  
  2886.       4) Validity is for all time.
  2887.  
  2888.       5) Subject name is constructed from the Principal name by
  2889.          removing the last simple name from the hierarchical name.
  2890.  
  2891.       6) Subject UID is the CA_UID.
  2892.  
  2893.       7) Subject Public Key is the CA_Public_Key
  2894.  
  2895.       8) Sequence number is 1.
  2896.  
  2897.       9) Sign the certificate with the newly generated private key of
  2898.          the principal.
  2899.  
  2900. 3.8.4 Change Password
  2901.  
  2902.    Change_password(                                 --inputs
  2903.                        Encrypted_credentials Encrypted Credentials,
  2904.                        Old_password          String,
  2905.                        New_password          String,
  2906.                                                     --outputs
  2907.                        Encrypted_credentials Encrypted Credentials)
  2908.  
  2909.    If credentials are stored encrypted under a password, it is possible
  2910.    to change the password if the old one is known.  Note that it is
  2911.  
  2912.  
  2913.  
  2914. Kaufman                                                        [Page 52]
  2915.  
  2916. RFC 1507                          DASS                    September 1993
  2917.  
  2918.  
  2919.    insufficient to just change a user's password if the password has
  2920.    been disclosed.  Anyone knowing the old password may have already
  2921.    learned the user's private key.  If a password has been disclosed,
  2922.    the secure recovery procedure is to call create_principal again
  2923.    followed by create_certificate to certify the new key.
  2924.  
  2925.    Using DASS, it may not be appropriate for users to periodically
  2926.    change their passwords as a precaution unless they also change their
  2927.    private keys by the procedure above.  The only likely use of the
  2928.    change_password procedure is to handle the case where an
  2929.    administrator has chosen a password for the user in the course of
  2930.    setting up the account and the user wishes to change it to something
  2931.    the user can remember.  A future version of the architecture may
  2932.    smooth key roll-over by having the change_password command also
  2933.    generate a new key and sign a "self" certificate in which the old key
  2934.    certifies the new one.  As a separate step, a CA which notices a self
  2935.    certificate posted in the naming service could certify the new key
  2936.    instead of the old one when the user's certificate is renewed.  While
  2937.    this procedure is not as rapid or as reliable as having the user
  2938.    directly interact with the CA, it offers a reasonable tradeoff
  2939.    between security and convenience when there is no evidence of
  2940.    password compromise.
  2941.  
  2942.    This routine simply decrypts the encrypted credentials structure
  2943.    supplied using the password supplied. It returns a bad status if the
  2944.    format of the decrypted information is bad (indicating an incorrect
  2945.    password). Otherwise, it creates a new encrypted credentials
  2946.    structure by encrypting the same data with the new password. It would
  2947.    be highly desirable for the user interface to this function to
  2948.    provide the capability to randomly generate passwords and prohibit
  2949.    easily guessed user chosen passwords using length, character set, and
  2950.    dictionary lookup rules, but such capabilities are beyond the scope
  2951.    of this document.  If encrypted credentials are stored in some local
  2952.    secure storage, the above function is all that is necessary (in fact,
  2953.    if the storage is sufficiently secure, no password is needed;
  2954.    credentials could be stored unenciphered).  If they are stored in a
  2955.    naming service, this function must be coupled with one which
  2956.    retrieves the old encrypted credentials from the naming service and
  2957.    stores the new.  The full protocol is likely to include access
  2958.    control checks that require the principal to acquire credentials and
  2959.    produce tokens.  For best security, the encrypted credentials should
  2960.    be accessible only through a login agent.  The role of the login
  2961.    agent is to audit and limit the rate of password guessing.  If
  2962.    passwords are well chosen, there is no significant threat from
  2963.    password guessing because searching the space is computationally
  2964.    infeasible.  In the context of a login agent, change password will be
  2965.    implemented with a specialized protocol requiring knowledge of the
  2966.    password and (for best security) a trusted authority from which the
  2967.  
  2968.  
  2969.  
  2970. Kaufman                                                        [Page 53]
  2971.  
  2972. RFC 1507                          DASS                    September 1993
  2973.  
  2974.  
  2975.    public key of the login agent can be learned.  See section 2.3.2 for
  2976.    the plans for the non-X.500 credential storage facility.
  2977.  
  2978. 3.8.5 Change Name
  2979.  
  2980.    Change_name(
  2981.                                                     --inputs
  2982.                        Claimant_Credentials  Credentials,
  2983.                        New_name              Name,
  2984.                        CA_Public_Key         Public Key,
  2985.                        CA_UID                UID,
  2986.                                                     --outputs
  2987.                        Trusted_Authority_Certificate Certificate)
  2988.  
  2989.    DASS permits a principal to have many current aliases, but only one
  2990.    current name.  A principal can authenticate itself as any of its
  2991.    aliases but verifies the names of others relative to the name by
  2992.    which it knows itself.  Aliases can be created simply by using the
  2993.    create_certificate function once for each alias.  To change the name
  2994.    of a principal, however, requires that the principal securely learn
  2995.    the public key and UID of its new parent CA.  As with
  2996.    create_principal, if a principal has secure private storage for its
  2997.    trusted authority information, it need not create a certificate, but
  2998.    some analogous procedure must be able to install new naming
  2999.    information.
  3000.  
  3001.    This routine produces a new Trusted Authority Certificate with
  3002.    contents as follows:
  3003.  
  3004.     a) Issuer name is New_name (an X.500 name)
  3005.  
  3006.     b) Issuer_UID is Principal UID from Credentials.
  3007.  
  3008.     c) Validity is for all time.
  3009.  
  3010.     d) Subject name is constructed from the Issuer name by removing
  3011.        the last simple name from the hierarchical name, and
  3012.        converting to an X.500 name.
  3013.  
  3014.     e) Subject UID is CA_UID
  3015.  
  3016.     f) Subject Public Key is CA_Public_Key
  3017.  
  3018.     g) Sequence number is 1.
  3019.  
  3020.     h) The certificate is signed with the private key of the
  3021.        principal from the credentials. Note that this call will only
  3022.        succeed if the principal's private key is in the credentials,
  3023.  
  3024.  
  3025.  
  3026. Kaufman                                                        [Page 54]
  3027.  
  3028. RFC 1507                          DASS                    September 1993
  3029.  
  3030.  
  3031.        which will only be true if the credentials were created by
  3032.        calling Create_server_credentials.
  3033.  
  3034. 3.9 Credential Maintenance Functions
  3035.  
  3036.    DASS credentials can potentially have information about two
  3037.    principals.  This functionality is included to support the case
  3038.    where a user on a node has two identities that might be
  3039.    recognized for purposes of managing access controls.  First,
  3040.    there is the user's network identity; second, there is an
  3041.    identity as controlling a particular "account" or "username" on
  3042.    that node.  There are two reasons for recognizing this second
  3043.    identity: first, access controls might be specified such that
  3044.    only a user is only permitted access to certain resources when
  3045.    coming through certain trusted nodes (e.g., files that can't be
  3046.    accessed from a terminal at home); and second, before the
  3047.    transition strategy to global identities is complete, as a way to
  3048.    refer to USER@NODE in a way analogous to existing mechanisms but
  3049.    with greater security.
  3050.  
  3051.    The mapping of global usernames to local user names on a node is
  3052.    outside the scope of DASS.  This is done via a "proxy database"
  3053.    or some analogous local mechanism.  What DASS provides are
  3054.    mechanisms for adding node oriented credentials into a user's
  3055.    credentials structure, carrying the dual authentication
  3056.    information in authentication tokens, and extracting the
  3057.    information from the credentials structure created by
  3058.    Accept_token.
  3059.  
  3060.    Some applications of DASS will not make use of the node
  3061.    authentication related extensions.  In that case, they will never
  3062.    use the Combine_credentials, Create_credentials, Get_node_info,
  3063.    or Verify_node_name functions.
  3064.  
  3065.    The "normal" sequence of events surrounding a user logging into a
  3066.    node are as follows:
  3067.  
  3068.     a) When the user logs in, he types either a local user ID known
  3069.        to the node or a global name (the details of the user
  3070.        interface are implementation specific).  Through some sort of
  3071.        local mapping, the node determines both a global name and a
  3072.        local account name.  The user also enters a password
  3073.        corresponding to the global name.
  3074.  
  3075.     b) The node calls network_login specifying the user's global name
  3076.        and the supplied password.  The result is credentials which
  3077.        can be used to access network services but which have not yet
  3078.        been verified to be valid.
  3079.  
  3080.  
  3081.  
  3082. Kaufman                                                        [Page 55]
  3083.  
  3084. RFC 1507                          DASS                    September 1993
  3085.  
  3086.  
  3087.     c) The node calls verify_principal_name using its own credentials
  3088.        to verify the authenticity of the user's credentials (these
  3089.        node credentials must have previously been established by a
  3090.        call to initialize_server during node initialization).
  3091.  
  3092.     d) If that test succeeds, the node adds its credentials to those
  3093.        of the user by calling combine_credentials.
  3094.  
  3095.    The set of facilities for manipulating credentials follow:
  3096.  
  3097. 3.9.1 Network login
  3098.  
  3099.    Network_login(
  3100.                                                     --inputs
  3101.                        Name                  Name,
  3102.                        password              String,
  3103.                        keysize               Integer,
  3104.                        expiration            Time interval,
  3105.                        TA_credentials        Credentials,--optional
  3106.                                                     --outputs
  3107.                        Claimant_credentials  Credentials)
  3108.  
  3109.    This function creates credentials for a principal when the principal
  3110.    "logs into the network".
  3111.  
  3112.    Name is the X.500 name of the principal.
  3113.  
  3114.    Password is a secret which authenticates the principal to the
  3115.    network.
  3116.  
  3117.    Keysize specifies the size of the temporary "login" or "delegation"
  3118.    key.  In a real implementation, it is expected to be an
  3119.    implementation constant (most likely 384 or 512 bits).
  3120.  
  3121.    Expiration sets a lifetime for the credentials created.  For a normal
  3122.    login, this is likely to be an implementation constant on the order
  3123.    of 8-72 hours.  Some mechanism for overriding it must be provided to
  3124.    make it possible (for example) to submit a background job that might
  3125.    run days or even months after they are submitted.
  3126.  
  3127.    TA_credentials   are used if the encrypted credentials are protected
  3128.    by a login agent. If they are missing, the password will be less well
  3129.    protected from guessing attacks.
  3130.  
  3131.    This routine does not (as one might expect) securely authenticate the
  3132.    principal to the calling procedure.  Since the password is used to
  3133.    obtain the principal's private key, this call will normally fail if
  3134.    the principal supplies an invalid password.  A penetrator who has
  3135.  
  3136.  
  3137.  
  3138. Kaufman                                                        [Page 56]
  3139.  
  3140. RFC 1507                          DASS                    September 1993
  3141.  
  3142.  
  3143.    compromised the naming service could plant fake encrypted credentials
  3144.    under any name and impersonate that name as far as this call is
  3145.    concerned. A caller that wishes to authenticate the user in addition
  3146.    to obtaining credentials to be able to act on the user's behalf
  3147.    should call Verify_principal_name (below) with the created
  3148.    credentials and the credentials of the calling process.
  3149.  
  3150.    This routine constructs a credentials structure from information
  3151.    found in the naming service encrypted using the supplied password.
  3152.  
  3153.     a) If the encrypted credentials structure is protected with a
  3154.        login agent, retrieve the public key of the login agent:
  3155.  
  3156.       1) If TA_credentials are available, use them in a call to
  3157.          Get_Pub_Keys to get the public key of the login agent (whose
  3158.          name is derived from the name of the principal by truncating
  3159.          the last element of the RDN and adding CSS=X509).
  3160.  
  3161.       2) If TA_credentials are not available, look up the public key
  3162.          of the login agent in the naming service.
  3163.  
  3164.        Login agents limit and audit password guesses, and are
  3165.        important when passwords may not be well chosen (as when users
  3166.        are allowed to choose their own).  To fully prevent the
  3167.        password guessing threat, principals may only log onto nodes
  3168.        that already have TA_credentials which can be used to
  3169.        authenticate the login agent.  To support nodes which have no
  3170.        credentials of their own and to allow this procedure to
  3171.        support node initialization, it is possible to network login
  3172.        without TA credentials.
  3173.  
  3174.        A principal who logs into a node that lacks TA credentials is
  3175.        subject to the following subtle security threat:  A penetrator
  3176.        who impersonates the naming service could post his own public
  3177.        key and address as those of the login agent.  This procedure
  3178.        would then in the process of logging in reveal the the
  3179.        penetrator enough information for the penetrator to mount an
  3180.        unaudited password guessing attack against the principal's
  3181.        credentials.
  3182.  
  3183.     b) Retrieve the encrypted credentials from the naming service or
  3184.        login agent.  In the case of the login agent, the password is
  3185.        one-way hashed to produce proof of knowledge of the password
  3186.        and the hashed value is supplied to the login agent encrypted
  3187.        under its public key as part of the request.
  3188.  
  3189.     c) Decrypt the encrypted credentials structure using a the
  3190.        supplied password. Verify that the decryption was successful
  3191.  
  3192.  
  3193.  
  3194. Kaufman                                                        [Page 57]
  3195.  
  3196. RFC 1507                          DASS                    September 1993
  3197.  
  3198.  
  3199.        by verifying that the resulting structure can be parsed
  3200.        according the the ASN.1 rules for Encrypted_Credentials and
  3201.        that the two included primes when multiplied together produce
  3202.        the included modulus. If the decryption was unsuccessful then
  3203.        the routine returns the `Invalid password' error status. The
  3204.        decryption results in both the Private Key and the Public Key.
  3205.  
  3206.     d) Generate a public/private key pair for the Delegation Key,
  3207.        using the indicated keysize. Key size is likely to be an
  3208.        implementation constant rather than a supplied parameter, with
  3209.        likely values being 384 and 512 bits.  Key sizes generally
  3210.        will have to increase over time as factoring technology and
  3211.        CPU speeds improve.  Delegation keys can be relatively shorter
  3212.        than long term keys because DASS is designed so that
  3213.        compromise of the delegation key after it has expired does not
  3214.        result in a security compromise.  An important advantage of
  3215.        making key size an implementation constant is that nodes can
  3216.        generate key pairs in advance, thus speeding up this procedure.
  3217.        Key generation is the most CPU intensive RSA procedure and
  3218.        could make login annoyingly slow.
  3219.  
  3220.     e) Construct a Login Ticket by signing with the user's private
  3221.        key a combination of the public key, a validity period
  3222.        constructed from the current time and the expiration passed in
  3223.        the call, and the principal UID found in the encrypted-key
  3224.        structure.
  3225.  
  3226.     f) Forget the user's private key.
  3227.  
  3228.     g) Retrieve from the naming service any trusted authority
  3229.        certificates stored with the user's entry. Discard any that
  3230.        are not signed by the user's public key and UID.  An
  3231.        implementation in which the login node has credentials of its
  3232.        own may choose its trusted authority information instead of
  3233.        retrieving and verifying trusted authority certificates from
  3234.        the naming service.  This will have a subtle effect on the
  3235.        security of the resulting system.
  3236.  
  3237.     h) Construct a credentials structure from:
  3238.  
  3239.       1) Claimant credentials:
  3240.  
  3241.         (i)  Name of the principal from calling parameter
  3242.         (ii) Login Ticket as constructed in (e)
  3243.         (iii)Delegation Private key as constructed in (d)
  3244.         (iv) Public key from the encrypted credentials structure
  3245.  
  3246.       2) No verifier credentials
  3247.  
  3248.  
  3249.  
  3250. Kaufman                                                        [Page 58]
  3251.  
  3252. RFC 1507                          DASS                    September 1993
  3253.  
  3254.  
  3255.       3) Trusted Authorities: for the most recently signed trusted
  3256.          authority certificate (There is normally only one Trusted
  3257.          Authority Certificate.  If there is more than one then an
  3258.          implementation may choose to maintain a list of all the valid
  3259.          keys. They should all refer to the same CA (UID and name).):
  3260.  
  3261.         (i)  Name of the CA from the subject field of the certificate
  3262.         (ii) Public Key of the CA from the subject public key field
  3263.         (iii)UID of the CA from the subject UID field
  3264.  
  3265.       4) no remote node credentials
  3266.  
  3267.       5) no local node credentials
  3268.  
  3269.       6) no cached outgoing associations
  3270.  
  3271.       7) no cached incoming associations
  3272.  
  3273. 3.9.2 Create Credentials
  3274.  
  3275.    Create_credentials(
  3276.                                                       --outputs
  3277.                        Claimant_credentials  Credentials)
  3278.  
  3279.  
  3280.    This routine creates an "empty" credentials structure.  It is needed
  3281.    in the case of a user logging into a node and obtaining node oriented
  3282.    credentials but no global username credentials.  Because the
  3283.    "combine_credentials" call wants to modify a set of user credentials
  3284.    rather than create a new set, this call is needed to produce the
  3285.    "shell" for combine_credentials to fill in.
  3286.  
  3287.    It is unlikely that any real implementation would support this
  3288.    function, but rather would have some functions which combine
  3289.    network_login, create_credentials, and combine_credentials in
  3290.    whatever ways are supported by that node.
  3291.  
  3292. 3.9.3 Combine Credentials
  3293.  
  3294.    Combine_credentials(
  3295.                                                     --inputs
  3296.                        node_credentials      Credentials,
  3297.                        localusername         String,
  3298.                                                     --updated
  3299.                        user_credentials      Credentials)
  3300.  
  3301.    This routine is provided by implementations which support the notion
  3302.    of local node credentials.  After the node has verified to its own
  3303.  
  3304.  
  3305.  
  3306. Kaufman                                                        [Page 59]
  3307.  
  3308. RFC 1507                          DASS                    September 1993
  3309.  
  3310.  
  3311.    satisfaction that the user_credentials are entitled to access to a
  3312.    particular local account, this call adds node credential information
  3313.    to the user_credential structure.  This function may be applied to
  3314.    user_credentials created by network_login, create_credentials, or
  3315.    accept_token.
  3316.  
  3317.     a) Fill in the local node credentials substructure of
  3318.        user_credentials as follows:
  3319.  
  3320.       1) Full name of the node: from Full name of the Principal in
  3321.          node_credentials
  3322.  
  3323.       2) Local username on the node: from proxy lookup
  3324.  
  3325.       3) RSA private key of the node: from verifier credentials in
  3326.          node_credentials
  3327.  
  3328.     b) Optionally,  change the trusted authorities to match the
  3329.        trusted authorities from the node credentials.  This is an
  3330.        implementation option, done most likely as a performance
  3331.        optimization.  The only case where this option is required is
  3332.        where no trusted authorities existed in the user credentials
  3333.        (because they were created by create_credentials of
  3334.        accept_token).  Server credentials should generally keep their
  3335.        own trusted authorities.
  3336.  
  3337.    It is likely that an implementation will choose not to replicate its
  3338.    node credentials in every credentials structure that it supports, but
  3339.    rather will maintain some sort of pointer to a single copy.  This
  3340.    algorithm is stated as it is only for ease of specification.
  3341.  
  3342. 3.9.4 Initialize_server
  3343.  
  3344.    initialize_server(
  3345.                                                     --inputs
  3346.                        Name                  Name,
  3347.                        password              String,
  3348.                        TA_credentials        Credentials, --optional
  3349.                                                     --outputs
  3350.                        Server_credentials    Credentials)
  3351.  
  3352.    Somehow a server must get access to its credentials. One way is for
  3353.    the credentials to be stored in the naming service like user
  3354.    credentials encrypted under a service password. The service then
  3355.    needs to gain at startup time access to a service password. This may
  3356.    be easier to manage and is not insecure so long as the service
  3357.    password is well chosen. Alternately, the service needs some
  3358.    mechanism to gain access directly to its credentials. The credentials
  3359.  
  3360.  
  3361.  
  3362. Kaufman                                                        [Page 60]
  3363.  
  3364. RFC 1507                          DASS                    September 1993
  3365.  
  3366.  
  3367.    created by this call are intended to be very long lived. They do not
  3368.    time out, so a node or server might store them in Non-Volatile memory
  3369.    after "initial installation" rather than calling this routine at each
  3370.    "boot". These credentials are shared between all servers which use
  3371.    the same key. This routine works as follows:
  3372.  
  3373.     a) Retrieve from the naming service or login agent the encrypted
  3374.        credentials structure corresponding to the supplied name. See
  3375.        Network_login for a discussion of the use of TA_credentials
  3376.        and login agents.
  3377.  
  3378.     b) Decrypt that structure using a one-way hash of the supplied
  3379.        password. Verify that the decryption was successful. Verify
  3380.        that the public key in the structure matches the private key.
  3381.  
  3382.     c) Retrieve from the naming service any trusted authority
  3383.        certificates stored under the supplied name. Discard any which
  3384.        do not contain the UID from the encrypted credentials
  3385.        structure or are not signed by the key in the encrypted
  3386.        credentials structure.
  3387.  
  3388.     d) Construct a credentials structure from:
  3389.  
  3390.       1) Claimant credentials:
  3391.         (i)   Name of the principal from the calling parameter
  3392.         (ii)  UID of the principal from the encrypted-key structure
  3393.         (iii) No login ticket
  3394.         (iv)  No login secret key
  3395.  
  3396.       2) Verifier credentials:
  3397.         (i)   Server secret key from the encrypted-key structure
  3398.  
  3399.       3) Trusted Authorities: from the most recently signed Trusted
  3400.          Authority Certificate:
  3401.         (i)   Name of CA from the Subject Name field
  3402.         (ii)  UID of the CA from the Subject UID field
  3403.         (iii) Public Key of the CA from the Subject Public Key field
  3404.  
  3405.       4) no node credentials
  3406.  
  3407.       5) no cached outgoing associations
  3408.  
  3409.       6) no cached incoming associations
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418. Kaufman                                                        [Page 61]
  3419.  
  3420. RFC 1507                          DASS                    September 1993
  3421.  
  3422.  
  3423. 3.9.5 Generate Server Ticket
  3424.  
  3425.    generate_server_ticket(
  3426.                                                     --inputs
  3427.                        expiration            Time interval,
  3428.                                                     --updated
  3429.                        Server_credentials    Credentials)
  3430.  
  3431.    Server credentials created by initialize_server can be used to accept
  3432.    incoming authentication tokens and can act as node_credentials for
  3433.    outgoing authentications, but cannot create user_credentials of their
  3434.    own. If a server initiates connections on its own behalf, it must
  3435.    have a ticket just like any other user might have. That ticket has
  3436.    limited lifetime and the right to act on behalf of the server can be
  3437.    delegated. The server cannot, however, delegate the right to receive
  3438.    connections intended for it. An implementation must come up with a
  3439.    policy for the expiration of server tickets and how long before
  3440.    expiration they are renewed.  A likely policy is for this procedure
  3441.    to be implicitly called by Create_token if there is no current ticket
  3442.    present in the credentials.  If so, this interface need not be
  3443.    exposed.
  3444.  
  3445.    This routine is implemented as follows:
  3446.  
  3447.     a) Generate an RSA public/private key pair.
  3448.  
  3449.     b) Compute a validity interval from the current time and the
  3450.        expiration supplied.
  3451.  
  3452.     c) Construct a login ticket from the RSA public key (from a),
  3453.        validity interval (from b), the UID from the credentials, and
  3454.        signed with the server key in the credentials. (Discard
  3455.        previous Login Ticket if there was one).
  3456.  
  3457.     d) Discard all information in the  Cached Outgoing Contexts.
  3458.  
  3459. 3.9.6 Delete Credentials
  3460.  
  3461.    delete_credentials(
  3462.                                                     --updated
  3463.                        credentials           Credentials)
  3464.  
  3465.    Erases the secrets in the credentials structure and deallocates the
  3466.    storage.
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474. Kaufman                                                        [Page 62]
  3475.  
  3476. RFC 1507                          DASS                    September 1993
  3477.  
  3478.  
  3479. 3.10 Authentication Procedures
  3480.  
  3481.    The guts of the authentication process takes place in the next two
  3482.    calls. When one principal wishes to authenticate to another, it calls
  3483.    Create_token and sends the token which results to the other. The
  3484.    recipient calls Accept_token and creates a new set of credentials.
  3485.    The other calls in this section manipulate the received credentials
  3486.    in order to retrieve its contents and verify the identity of the
  3487.    token creator.
  3488.  
  3489. 3.10.1  Create Token
  3490.  
  3491.    Create_token(
  3492.                                                     --inputs
  3493.                        target_name            Name,
  3494.                        deleg_req_flag         Boolean,
  3495.                        mutual_req_flag        Boolean,
  3496.                        replay_det_req_flag    Boolean,
  3497.                        sequence_req_flag      Boolean,
  3498.                        chan_bindings          Octet String,
  3499.                        Include_principal_name Boolean,
  3500.                        Include_node_name      Boolean,
  3501.                        Include_username       Boolean,
  3502.                                                       --updated
  3503.                        claimant_credentials   Credentials,
  3504.                                                     --outputs
  3505.                        authentication_token   Authentication token,
  3506.                        mutual_authentication_token
  3507.                                    Mutual Authentication token,
  3508.                        Shared_key             Shared Key,
  3509.                        instance_identifier    Timestamp)
  3510.  
  3511.    This routine is used by the initiator of a connection to create an
  3512.    authentication token which will prove its identity. If the claimant
  3513.    credentials includes node/account information, the token will include
  3514.    node authentication.
  3515.  
  3516.    target_name is the X.500 name of the intended recipient of the token.
  3517.    Only an entity with access to the private key associated with that
  3518.    name will be able to verify the created token and generate the
  3519.    mutual_authentication_token.
  3520.  
  3521.    deleg_req_flag indicates whether the caller wishes to delegate to the
  3522.    recipient of the token. If it is set, the delegated_credentials
  3523.    returned by Accept_token will be capable of generating tokens on
  3524.    behalf of the caller. Node based authentication information cannot be
  3525.    delegated. The mutual_req_flag, replay_det_req_flag , and
  3526.    sequence_req_flag are put in the authentication token and passed to
  3527.  
  3528.  
  3529.  
  3530. Kaufman                                                        [Page 63]
  3531.  
  3532. RFC 1507                          DASS                    September 1993
  3533.  
  3534.  
  3535.    the target.  This information is included in the token to make it
  3536.    easier to implement the GSSAPI over DASS.  DASS itself makes no use
  3537.    of this information.
  3538.  
  3539.    In most applications, the purpose of a token exchange is to
  3540.    authenticate the principals controlling the two ends of a
  3541.    communication channel.  chan_bindings contains an identifier of the
  3542.    channel which is being authenticated, and thus its format and content
  3543.    should be tied to the underlying communication protocol.  DASS only
  3544.    guarantees that the information has been communicated reliably to the
  3545.    named target. If DASS is used with a cryptographically protected
  3546.    channel (such as SP4), this data should contain a one-way hash of the
  3547.    key used to encrypt the channel. If that channel is multiplexed, the
  3548.    data should also include the ID of the subchannel.  If the channel is
  3549.    not encrypted, the network must be trusted not to modify data on a
  3550.    connection.  The source and target network addresses and a connection
  3551.    ID should be included in the chan_bindings at the source and checked
  3552.    at the target.  A token exchange also results in the two ends sharing
  3553.    a key and an instance identifier.  If that key and instance
  3554.    identifier are used to cryptographically protect subsequent
  3555.    communications, then chan_bindings need not have any cryptographic
  3556.    significance but may be used to differentiate multiple entities
  3557.    sharing the public keys of communicating principals.  For example, if
  3558.    a service is replicated and all replicas share a public key,
  3559.    chan_bindings should include something that identifies a single
  3560.    instance of the service (such as current address) so that the token
  3561.    cannot be successfully presented to more than one of the servers.
  3562.  
  3563.    include_principal_name, include_node_name, and include_username are
  3564.    flags which determine whether the principal name, node name, and/or
  3565.    username from the credentials structure are to be included in the
  3566.    token.  This information is made optional in a token so that
  3567.    applications which communicate this information out of band can
  3568.    produce "compressed" tokens.  If this information is included in the
  3569.    token, it will be used to populate the corresponding fields in the
  3570.    credentials structure created by Accept_token.  claimant_credentials
  3571.    are the credentials of the calling procedure.  The secrets contained
  3572.    therein are used to sign the token and the trusted authorities are
  3573.    used to securely learn the public key of the target.  The cached
  3574.    outgoing contexts portion of the credentials may be updated as a side
  3575.    effect of this call.
  3576.  
  3577.    The major output of this routine is an  authentication_token which
  3578.    can be passed to the target in order to authenticate the caller.
  3579.  
  3580.    In addition to returning an authentication token, this routine
  3581.    returns a mutual_authentication_token,  a shared_key, and an
  3582.    instance_identifier. The mutual authentication token is the same as
  3583.  
  3584.  
  3585.  
  3586. Kaufman                                                        [Page 64]
  3587.  
  3588. RFC 1507                          DASS                    September 1993
  3589.  
  3590.  
  3591.    the one generated by the Accept_token call at the target. If the
  3592.    protocol using DASS wishes mutual authentication, the target should
  3593.    return this token to the source. The source will compare it to the
  3594.    one returned by this routine using Compare_Mutual_Token (below) and
  3595.    know that the token was accepted at its proper destination.
  3596.  
  3597.    The DES key and instance identifier can be used to encrypt or sign
  3598.    data to be sent to this target. The key and instance will be given to
  3599.    the target by Accept_token, and the key will only be known by the two
  3600.    parties to the authentication. If a single set of credentials is used
  3601.    to authenticate to the same target more than once, the same DES key
  3602.    is likely to be returned each time.  If the parties wish to protect
  3603.    against the possibility of an outside agent mixing and matching
  3604.    messages from one authenticated session with those of another, they
  3605.    should include the instance identifier in the messages. The instance
  3606.    identifier is a timestamp and it is guaranteed that the DES
  3607.    key/instance identifier pair will be unique.
  3608.  
  3609.    An implementation may wish to "hide" the DES key from calling
  3610.    applications by placing it in system storage and providing calls
  3611.    which encrypt/decrypt/sign/verify using the key.
  3612.  
  3613.    The primary tasks of this routine are to create its output
  3614.    parameters. As a side effect, it may also update claimant_credentials
  3615.    It's algorithm is as follows:
  3616.  
  3617.     a) The login ticket is checked. If it has passed the end of its
  3618.        lifetime an `Login Ticket Expired' error is returned. If there
  3619.        is a login ticket, but no corresponding private key then an
  3620.        `Invalid credentials' error is returned (this is the case if
  3621.        the credentials were created by an authentication-without-
  3622.        delegation operation).  If there is no login ticket or an
  3623.        expired one and if the long term private key is present in the
  3624.        credentials, an implementation may choose to automatically call
  3625.        create_server_ticket to renew the ticket.
  3626.  
  3627.     b) Create new timestamp using the current time.  (This timestamp
  3628.        must be unique for this Shared Key. The timestamp is a 64 bit
  3629.        POSIX time, with a resolution of 1 nanosecond An implemen tation
  3630.        must ensure that timestamps cannot be reused.)
  3631.  
  3632.     c) The public key and UID of target_name are looked up by calling
  3633.        get_pub_keys, using the target_name and the Trusted Authority
  3634.        section of the claimant_credentials structure. If none is
  3635.        found, an error status is returned. Otherwise, the cached
  3636.        outbound connections portion of credentials are searched
  3637.        (indexed by target Public Key) for a cached Shared key with a
  3638.        validity interval which has not expired. If a suitable one is
  3639.  
  3640.  
  3641.  
  3642. Kaufman                                                        [Page 65]
  3643.  
  3644. RFC 1507                          DASS                    September 1993
  3645.  
  3646.  
  3647.        found skip to step g, else create a cache entry as follows:
  3648.  
  3649.     d) Destination Public Key is the one found looking up the target.
  3650.        A Shared Key is generated at random. A validity interval is
  3651.        chosen according to node policy but not to exceed the validity
  3652.        interval of the ticket in the credentials (if any).
  3653.  
  3654.     e) Create the Encrypted Shared Key, using the public key of the
  3655.        Target, and place in the cache.
  3656.  
  3657.     f) If node authentication credentials are available in the
  3658.        credentials structure, create a "Node Ticket" signature using
  3659.        the node secret and include it in the cache.
  3660.  
  3661.     g) If delegation is requested and no delegator is present in the
  3662.        cache, create one by encrypting the delegation private key
  3663.        under the Shared key. The delegation private key is
  3664.        represented as an ASN.1 data structure containing only one of
  3665.        the primes (p).
  3666.  
  3667.     h) If delegation is not requested and no Shared Key Ticket is in
  3668.        the cache, create one by signing the requisite information
  3669.        with the delegation private key.
  3670.  
  3671.     i) Create the Authenticator.  The contents of the Authenticator
  3672.        (including the channel bindings) are encoded into ASN.1, and
  3673.        the signature is computed. The Authenticator is then
  3674.        re-encoded, without including the Channel Bindings but using
  3675.        the same signature.
  3676.  
  3677.     j) Create output_token as follows:
  3678.       1) Encrypted Shared Key from cache
  3679.       2) Login Ticket from Claimant Credentials (if present)
  3680.       3) Shared Key Ticket from cache (if no delegation and if
  3681.          present)
  3682.       4) Node Ticket from cache (if present)
  3683.       5) Delegator from cache (if delegation and if present)
  3684.       6) Authenticator
  3685.       7) Principal name from credentials (if present and parameter
  3686.          requests this)
  3687.       8) Node name from credentials (if present and parameter request
  3688.          this)
  3689.       9) Local Username from credentials (if present and parameter
  3690.          requests this)
  3691.  
  3692.     k) Compute Mutual_authentication_token by encrypting the
  3693.        timestamp from the authenticator using the Shared key.
  3694.  
  3695.  
  3696.  
  3697.  
  3698. Kaufman                                                        [Page 66]
  3699.  
  3700. RFC 1507                          DASS                    September 1993
  3701.  
  3702.  
  3703.     l) The instance_identifier is the timestamp. This and the Shared
  3704.        key are returned for use by the caller for further encryption
  3705.        operations (if these are supported).
  3706.  
  3707. 3.10.2 Accept_token
  3708.  
  3709.    Accept_token(
  3710.                                                     --inputs
  3711.                        authentication_token  Authentication Token,
  3712.                        chan_bindings         Octet String,
  3713.                                                      --updated
  3714.                        verifying_credentials Credentials,
  3715.                                                     --outputs
  3716.                        accepted_credentials  Credentials,
  3717.                        deleg_req_flag        Boolean,
  3718.                        mutual_req_flag       Boolean,
  3719.                        replay_det_req_flag   Boolean,
  3720.                        sequence_req_flag     Boolean,
  3721.                        mutual_authentication_token
  3722.                                         Mutual authentication token
  3723.                        shared_key            Shared Key,
  3724.                        instance_identifier   Timestamp)
  3725.  
  3726.    This routine is used by the recipient of an authentication token to
  3727.    validate it.  authentication_token is the token as received;
  3728.    chan_bindings is the identifier of the channel being authenticated.
  3729.    See the description of Create_token for information on the
  3730.    appropriate contents for chan_bindings.  DASS does not enforce any
  3731.    particular content, but checks to assure that the same value is
  3732.    supplied to both Create_token and Accept_token.
  3733.  
  3734.    Verifying_credentials are the credentials of the recipient of the
  3735.    token.  They must include the private key of the entity named as the
  3736.    target in Create_token or the call will fail.  The cached incoming
  3737.    contexts section of the verifying credentials may be modified as a
  3738.    side effect of this call.
  3739.  
  3740.    Accepted_credentials will contain additional information about the
  3741.    token creator. If delegation was requested, these credentials can be
  3742.    used to make additional calls to Create_token on the creator's
  3743.    behalf. Whether or not delegation was requested, they can also be
  3744.    used in the calls which follow to gain additional information about
  3745.    the token creator.
  3746.  
  3747.    The deleg_req_flag indicates whether the accepted_credentials include
  3748.    delegation which can be used by the recipient to act on behalf of the
  3749.    principal.  Mutual_req_flag, replay_det_req_flag, and
  3750.    sequence_req_flag are passed through from Create_token in support of
  3751.  
  3752.  
  3753.  
  3754. Kaufman                                                        [Page 67]
  3755.  
  3756. RFC 1507                          DASS                    September 1993
  3757.  
  3758.  
  3759.    the GSSAPI.  DASS makes no use of these fields.
  3760.  
  3761.    The mutual_authentication_token can be returned to the token creator
  3762.    as proof of receipt. In many protocols, this will be used by a client
  3763.    to authenticate a server. Only the genuine server would be able to
  3764.    compute the mutual_authentication_token from the token.
  3765.  
  3766.    The shared_key and instance_identifier can be used to encrypt or sign
  3767.    data between the two authenticating parties. See Create_token.
  3768.  
  3769.    This routine verifies the contents of the authentication token in the
  3770.    context of the verifying credentials (In particular, the Private Key
  3771.    of the server is used.  Also, the Cached Incoming Contexts and
  3772.    Incoming Timestamp list is used.) and returns information about it.
  3773.    The algorithm updates a cache of information. This cache is not
  3774.    updated if the algorithm exits with an error. The algorithm is as
  3775.    follows:
  3776.  
  3777.     a) If there is a Login Ticket, but no Shared Key Ticket or
  3778.        Delegator then exit with error `Invalid Authenticator'. If
  3779.        there is a Shared Key Ticket or Delegator, but no Login Ticket
  3780.        then exit with error `Invalid Authentication Token'.
  3781.  
  3782.        Look up the Encrypted Shared key in the Cached Incoming Contexts
  3783.        of the credentials structure. (This cache entry is used during
  3784.        the execution of this routine. An implementation must ensure that
  3785.        references to the cache entry can not be affected by other users
  3786.        modifying the cache.  One way is to use a copy of the cache entry,
  3787.        and update it at exit.)  If it is not found then create
  3788.        a new cache entry as follows:
  3789.  
  3790.       1) Encrypted Shared Key, from the Authentication Token.
  3791.  
  3792.       2) Shared Key and Validity Interval, by decrypting the
  3793.          Encrypted Shared Key using the server private key in
  3794.          credentials. If the decryption fails then exit with error
  3795.          `Invalid Authentication Token'.
  3796.  
  3797.     b) Check that the Validity Interval (in the cache entry) includes
  3798.        the current time; return `Invalid Authentication Token' if not.
  3799.  
  3800.        Check the Timestamp is within max-clock-skew of the current
  3801.        time, return `invalid Authentication Token' if not.
  3802.  
  3803.        Reconstruct the Authenticator including the Channel Bindings
  3804.        passed as a parameter.
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810. Kaufman                                                        [Page 68]
  3811.  
  3812. RFC 1507                          DASS                    September 1993
  3813.  
  3814.  
  3815.        Check that the reconstructed Authenticator is signed by the
  3816.        Shared key. If not then exit with error `Invalid
  3817.        Authentication Token'.
  3818.  
  3819.        Look up the Authenticator Signature in the Received
  3820.        Authenticators. If the same Signature is found in the list
  3821.        then exit with error `Duplicate Authenticator'. Otherwise add
  3822.        the Signature and timestamp to the list.
  3823.  
  3824.        If there is a Login Ticket and the Delegation Public key is in
  3825.        the cache entry, then check that the same key is specified in
  3826.        the Login Ticket, if not then exit with error `Invalid
  3827.        Authentication Token'. Place the Delegation Public key in the
  3828.        cache if it is not already there.
  3829.  
  3830.        If there is a Login Ticket, the Delegation Public key was not
  3831.        previously in the cache entry, and there is a Shared Key
  3832.        Ticket in the Authentication Token, then check that the Shared
  3833.        Key Ticket is signed by the Delegation Public Key in the Login
  3834.        Ticket. If not then exit with error `Invalid Authentication
  3835.        Token'.
  3836.  
  3837.        If a delegator is present in the message then decrypt the
  3838.        delegator using the Shared key. If the private key does not
  3839.        match the Delegation Public key then exit with error
  3840.        `Invalid Authentication Token' (The prime in the delegator
  3841.        is used to find the other prime (from the modulus). The division
  3842.        must not have a remainder.  Neither prime may be 1. The two
  3843.        primes are then used to reconstruct any other information
  3844.        needed to perform cryptographic operations.).
  3845.  
  3846.        Build the delegation credentials data structure as follows:
  3847.  
  3848.        1) Claimant credentials:
  3849.         (i)  Login Ticket from the Authentication token
  3850.         (ii) Delegation Private key from the decrypted delegator if
  3851.               the token is delegating.
  3852.         (iii)Encrypted Shared Key from the Authentication token.
  3853.        2) There are no verifier credentials.
  3854.        3) Trusted authorities are copied from the verifying_credentials
  3855.           passed to this routine (If an implementation is able to
  3856.           obtain the original Trusted Authorities of the Principal then
  3857.           it may do so instead of using the server's Trusted
  3858.           Authorities.).
  3859.        4) Remote node credentials (Node name, Username, Node Ticket)
  3860.        5) There are no local node credentials.
  3861.        6) There are no cached contexts.
  3862.  
  3863.  
  3864.  
  3865.  
  3866. Kaufman                                                        [Page 69]
  3867.  
  3868. RFC 1507                          DASS                    September 1993
  3869.  
  3870.  
  3871.     c) The returned boolean values are obtained from the
  3872.        Authenticator.
  3873.  
  3874.     d) Mutual_authentication_token is computed by encrypting the
  3875.        timestamp from the Authenticator with the Shared key from the
  3876.        cache.
  3877.  
  3878.     e) Instance_identifier is the timestamp from the Authenticator.
  3879.        This and the Shared key are returned to the caller for further
  3880.        encryption operations (if these are supported).
  3881.  
  3882. 3.10.3 Compare Mutual Token
  3883.  
  3884.    Compare_mutual_token(
  3885.                                                     --inputs
  3886.                        Generated_token    Mutual authentication token,
  3887.                        Received_token     Mutual authentication token,
  3888.                                                      --outputs
  3889.                        equality_flag         Boolean)
  3890.  
  3891.    This routine compares two mutual authentication tokens and tells
  3892.    whether they match.  In the expected use, the first is the token
  3893.    generated by Create_token at the initiating end and the second is the
  3894.    token generated by Accept_token at the accepting end and returned to
  3895.    the initiating end.  This routine can be implemented as a byte by
  3896.    byte comparison of the two parameters.
  3897.  
  3898. 3.10.4 Get Node Info
  3899.  
  3900.    get_node_info(
  3901.                                                     --inputs
  3902.                        accepted_credentials  Credentials,
  3903.                                                     --outputs
  3904.                        nodename              Name,
  3905.                        username              String)
  3906.  
  3907.    This routine extracts from accepted credentials the name of the node
  3908.    from which the authentication token came and the named account on
  3909.    that node. Because this information is not cryptographically
  3910.    protected within the token, this information can only be regarded as
  3911.    a "hint" by the receiving application.  It can, however, be verified
  3912.    using Verify_node_name in a cryptographically secure manner.  This
  3913.    information will only be present if these are accepted credentials
  3914.    and it the caller of Create_token set the include_node_name and/or
  3915.    include_username flags.
  3916.  
  3917.    An actual implementation is not likely to have get_node_info and
  3918.    verify_node_name as separate calls.  They are specified this way
  3919.  
  3920.  
  3921.  
  3922. Kaufman                                                        [Page 70]
  3923.  
  3924. RFC 1507                          DASS                    September 1993
  3925.  
  3926.  
  3927.    because there are different ways this information might be used.  For
  3928.    most applications, the nodename and username will be included in the
  3929.    token, and a single function might extract and verify them (it might
  3930.    in fact be part of accept token).  For other applications, the
  3931.    nodename and username will not be in the token but rather will be
  3932.    computed from other information passed during connection initiation
  3933.    so a call would have to take these as inputs.  Still other
  3934.    applications such as ACL evaluators that want to support the renaming
  3935.    and aliasing capabilities of DASS would defer verifying node
  3936.    information until they came upon an ACL which allowed access only
  3937.    from a particular node.  They would then verify that the name on the
  3938.    ACL was an authenticatable alias for the node which created the
  3939.    token.  All of these uses can be defined in terms of calls to
  3940.    get_node_info and verify_node_name.
  3941.  
  3942. 3.10.5 Get Principal UID
  3943.  
  3944.    get_principal_uid(
  3945.                                                     --inputs
  3946.                        accepted_credentials  Credentials,
  3947.                                                     --outputs
  3948.                        uid                   UID)
  3949.  
  3950.    This routine extracts a principal UID from a set of credentials.
  3951.  
  3952.    As with Get_Node_Info, this interface is not likely to appear in an
  3953.    actual implementation, but rather will be bundled with other
  3954.    routines.  It is specified this way because there might be a variety
  3955.    of algorithms by which credentials are evaluated and all of them can
  3956.    be defined in terms of these primitives.
  3957.  
  3958.    In DASS, it is possible for a principal to have many aliases.  This
  3959.    can happen either because the principal was given multiple names to
  3960.    limit the number of CAs that need to be trusted when authenticating
  3961.    to different servers or because the principal's name has changed and
  3962.    the old name remains behind as an alias.  Accept_token returns the
  3963.    name by which the principal identified itself when creating its
  3964.    credentials. A service may know the user by some alias. The normal
  3965.    way to handle this is for the service to know the principal's UID
  3966.    (which is constant over name changes) and to compare it with the UID
  3967.    in the token to identify a likely alias situation. It gets the UID
  3968.    from the token using this routine. It then confirms the alias by
  3969.    calling verify_principal_name.
  3970.  
  3971.    The UID is in a signed portion of accepted credentials, but the
  3972.    signature may not have been verified at the time this call is issued.
  3973.    The information returned by this routine must therefore be regarded
  3974.    as a hint.  If a call to Verify_principal_name succeeds, however,
  3975.  
  3976.  
  3977.  
  3978. Kaufman                                                        [Page 71]
  3979.  
  3980. RFC 1507                          DASS                    September 1993
  3981.  
  3982.  
  3983.    then the caller can securely know that the name given to that routine
  3984.    and the UID returned by this one are the authenticated source of the
  3985.    token.
  3986.  
  3987. 3.10.6 Get Principal Name
  3988.  
  3989.    get_principal_name(
  3990.                                                     --inputs
  3991.                        accepted_credentials  Credentials,
  3992.                                                     --outputs
  3993.                        name                  Name)
  3994.  
  3995.    This routine extracts a principal name from a set of credentials.
  3996.    This name is the name most recently associated with the principal. It
  3997.    may be the name that the principal supplied when the credentials were
  3998.    created (in which case it may not have been verified yet) or it may
  3999.    be a different name that has been verified.
  4000.  
  4001.    As with Get_Node_Info and Get_Principal_UID, this routine is not
  4002.    likely to appear in an actual implementation, but will be bundled in
  4003.    some fashion with related procedures.  The name returned by this
  4004.    procedure is not guaranteed to have been cryptographically verified.
  4005.    Verify_Principal_Name performs that function.
  4006.  
  4007. 3.10.7 Get Lifetime
  4008.  
  4009.    get_lifetime(
  4010.                                                     --inputs
  4011.                        Claimant_credentials  Credentials,
  4012.                                                     --outputs
  4013.                        lifetime              Duration)
  4014.  
  4015.    This routine computes the life remaining in a set of credentials.
  4016.    Its most common use would be to know to renew credentials before they
  4017.    expire.
  4018.  
  4019.    Returns the remaining lifetime of the login ticket in the
  4020.    credentials. This can either be the done on the node where the
  4021.    original login took place, or at a server which has been delegated
  4022.    to. It indicates how much longer these credentials can be used for
  4023.    further delegations. This routine will return 0 if the login ticket
  4024.    has passed the end of its life, if there is no login ticket, or if
  4025.    the credentials do not contain the private key certified by the
  4026.    ticket (i.e., where they were created by an authentication-without-
  4027.    delegation operation).
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034. Kaufman                                                        [Page 72]
  4035.  
  4036. RFC 1507                          DASS                    September 1993
  4037.  
  4038.  
  4039. 3.10.8 Verify Node Name
  4040.  
  4041.    Verify_node_name(
  4042.                                                     --inputs
  4043.                        nodename              Name,
  4044.                        username              String,
  4045.                                                      --updated
  4046.                        verifying_credentials Credentials,
  4047.                        accepted_credentials  Credentials,
  4048.                                                     --outputs
  4049.                        Name matches          Boolean)
  4050.  
  4051.    This routine tests whether the originating node of an authentication
  4052.    token can be authenticated as having the provided name. Like a
  4053.    principal, a node may have multiple aliases. One of them may be
  4054.    returned by Get_node_info, but this call allows a suspected alias to
  4055.    be verified.  The verifying credentials supplied with this call must
  4056.    be the same credentials as were used in the Accept_token call. The
  4057.    procedure for completing this request is as follows:
  4058.  
  4059.     a) If there is no Node Ticket in the claimant credentials then
  4060.        return False.
  4061.  
  4062.     b) Search the incoming context cache of the verifying credentials
  4063.        for an entry containing the same encrypted shared key as the
  4064.        encrypted shared key subfield of the claimant information of
  4065.        the accepted credentials.  In the steps which follow,
  4066.        references to "the cache" refer to this entry.  If none is
  4067.        found, initialize such an entry as follows:
  4068.  
  4069.       1) Encrypted shared key from the encrypted shared key subfield
  4070.          of the claimant information of the accepted credentials.
  4071.  
  4072.       2) The shared key and validity interval are determined by
  4073.          decrypting the encrypted shared key using the RSA private
  4074.          key in the verifier information of the server credentials.
  4075.          If this procedure is called after a call to Accept_token
  4076.          using the same server credentials (as is required for
  4077.          correct use), the shared key and validity interval must
  4078.          correctly decrypt.  If called in some other context, the
  4079.          results are undefined.  The validity interval is not
  4080.          checked.
  4081.  
  4082.       3) Initialize all other entries in the cache to missing.
  4083.  
  4084.     c) If there is a "local username on client node" in the cache and
  4085.        it does not match the username supplied as a parameter, return
  4086.        False.
  4087.  
  4088.  
  4089.  
  4090. Kaufman                                                        [Page 73]
  4091.  
  4092. RFC 1507                          DASS                    September 1993
  4093.  
  4094.  
  4095.     d) If there is a "name of client node" in the cache and it
  4096.        matches the nodename supplied as a parameter:
  4097.  
  4098.       1) Set the "Full name of the node" subfield of the remote node
  4099.          authentication field of the accepted credentials to be the
  4100.          nodename supplied as a parameter.
  4101.  
  4102.       2) Set the "Local Username on the node" subfield of the remote
  4103.          node authentication field of the accepted credentials to be
  4104.          the username supplied as a parameter.
  4105.  
  4106.       3) return True.
  4107.  
  4108.     e) Call the Get_Pub_Keys subroutine with the server_credentials,
  4109.        the nodename supplied as a parameter, and Try_Hard=False.
  4110.  
  4111.     f) If "Public Key of Client Node" is missing from the cache,
  4112.        check all of the Public keys returned to see if one verifies
  4113.        the node ticket.  If one does, set the "Public Key of Client
  4114.        Node" and "UID of Client Node" fields in the cache to be the
  4115.        PK/UID pair that verified the ticket and set the "Local
  4116.        Username on Client node" field to be the username supplied as
  4117.        a parameter..
  4118.  
  4119.     g) If any of the Public Key/UID pairs match the "Public Key of
  4120.        Client Node" and "UID of Client Node" fields in the cache,
  4121.        then:
  4122.  
  4123.       1) Set the "name of client node" in the cache equal to the
  4124.          nodename supplied as a parameter.
  4125.  
  4126.       2) Set the "Full name of the node" subfield of the remote node
  4127.          authentication field of the accepted credentials to be the
  4128.          nodename supplied as a parameter.
  4129.  
  4130.       3) Set the "Local Username on the node" subfield of the remote
  4131.          node authentication field of the accepted credentials to be
  4132.          the username supplied as a parameter.
  4133.  
  4134.       4) Return True.
  4135.  
  4136.     h) If none of them match, call Get_Pub_Keys again with
  4137.        Try_Hard=True and repeat steps 6 & 7.  If Step 7 fails a
  4138.        second time, return False.
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146. Kaufman                                                        [Page 74]
  4147.  
  4148. RFC 1507                          DASS                    September 1993
  4149.  
  4150.  
  4151. 3.10.9 Verify Principal Name
  4152.  
  4153.    Verify_principal_name(
  4154.                                                     --inputs
  4155.                        principal_name        Name,
  4156.                                                      --updated
  4157.                        verifier_credentials  Credentials,
  4158.                        claimant_credentials  Credentials,
  4159.                                                     --outputs
  4160.                        Name matches          Boolean)
  4161.  
  4162.    This routine tests (in the context of the verifier credentials)
  4163.    whether the claimant credentials are authenticatable as being those
  4164.    of the named principal.  This procedure is called with a set of
  4165.    accepted credentials to authenticate their source, or with a set of
  4166.    credentials produced by network_login to authenticate the creator of
  4167.    those credentials.  If the claimant credentials were created by
  4168.    Accept_token, then the verifier credentials supplied in this call
  4169.    must be the same as those used in that call.  The procedure for
  4170.    completing this request is as follows:
  4171.  
  4172.     a) If there is no Login Ticket in the claimant credentials, then
  4173.        return False.
  4174.  
  4175.     b) If the current time is not within the validity interval of the
  4176.        Login Ticket, then return False.
  4177.  
  4178.     c) If there is an Encrypted Shared Key present in the Claimant
  4179.        information field of the claimant credentials, then find or
  4180.        create a matching cache entry in the Cached Incoming Contexts
  4181.        of the verifier credentials.  In the description which
  4182.        follows, references to "the cache" refer to this entry.  If
  4183.        the cache entry must be created, its contents is set to be as
  4184.        follows:
  4185.  
  4186.       1) Encrypted shared key from the encrypted shared key subfield
  4187.          of the claimant information of the accepted credentials.
  4188.  
  4189.       2) The shared key and validity interval are determined by
  4190.          decrypting the encrypted shared key using the RSA private
  4191.          key in the verifier information of the server credentials.
  4192.          If this procedure is called after a call to Accept_token
  4193.          using the same server credentials (as is required for
  4194.          correct use), the shared key and validity interval must
  4195.          correctly decrypt.  If called in some other context, the
  4196.          results are undefined.  The validity interval is not
  4197.          checked.
  4198.  
  4199.  
  4200.  
  4201.  
  4202. Kaufman                                                        [Page 75]
  4203.  
  4204. RFC 1507                          DASS                    September 1993
  4205.  
  4206.  
  4207.       3) Initialize all other entries in the cache to missing.
  4208.  
  4209.     d) If there is a cache entry and if the "Public Key of Client
  4210.        Principal" field is present and if the "UID of Client
  4211.        Principal" field is present and matches the UID in the Login
  4212.        Ticket, then:
  4213.  
  4214.       1) Set the Public Key of the principal field in the Claimant
  4215.          information to be the Public Key of Client Principal.
  4216.  
  4217.       2) If the "Full name of the principal" field is missing from
  4218.          the claimant information of the claimant credentials, then
  4219.          set it to the "Name of Client Principal" field from the
  4220.          cache.
  4221.  
  4222.     e) If there is a cache entry and if the "Name of Client
  4223.        Principal" field is present and if it matches the principal
  4224.        name supplied to this routine and if the UID in the cache
  4225.        matches the UID in the Login Ticket, return True.
  4226.  
  4227.     f) Call the Get_Pub_Keys subroutine with the name and verifier
  4228.        credentials supplied to this routine and Try_Hard=FALSE.
  4229.        Ignore any keys retrieved where the corresponding UID does not
  4230.        match the UID in the claimant credentials.
  4231.  
  4232.     g) If the Public Key of the principal is missing from the
  4233.        claimant information of the claimant credentials, then attempt
  4234.        to verify the signature on the login ticket with each public
  4235.        key returned by Get_Pub_Keys.  If verification succeeds:
  4236.  
  4237.       1) Set the Public Key of the principal in the claimant
  4238.          information of the claimant credentials to be the Public Key
  4239.          that verified the ticket.
  4240.  
  4241.       2) If the Full name of the principal in the claimant
  4242.          information of the claimant credentials is missing, set it
  4243.          to the name supplied to this routine.
  4244.  
  4245.       3) If there is a cache entry, set the Name of Client Principal
  4246.          to be the name supplied to this routine, the UID of Client
  4247.          Principal to be the UID from the Login Ticket, and the
  4248.          Public Key of Client Principal to be the Public Key that
  4249.          verified the ticket.
  4250.  
  4251.       4) Return True.
  4252.  
  4253.     h) If the Public Key of the principal is present in the claimant
  4254.        information of the claimant credentials, then see if it
  4255.  
  4256.  
  4257.  
  4258. Kaufman                                                        [Page 76]
  4259.  
  4260. RFC 1507                          DASS                    September 1993
  4261.  
  4262.  
  4263.        matches any of the public keys returned by Get_Pub_Keys.  If
  4264.        one of them matches:
  4265.  
  4266.       1) If the Full name of the principal in the claimant
  4267.          information of the claimant credentials is missing, set it
  4268.          to the name supplied to this routine.
  4269.  
  4270.       2) If there is a cache entry, set the Name of Client Principal
  4271.          to be the name supplied to this routine, the UID of Client
  4272.          Principal to be the UID from the Login Ticket, and the
  4273.          Public Key of Client Principal to be the Public Key that
  4274.          verified the ticket.
  4275.  
  4276.       3) Return True.
  4277.  
  4278.     i) If steps 7 & 8 fail, retry the call to Get_Pub_Keys with
  4279.        Try_Hard=TRUE, and retry steps 7 & 8.  If they fail again,
  4280.        return false.
  4281.  
  4282. 3.10.10 Get Pub Keys
  4283.  
  4284.    Get_Pub_Keys(
  4285.                                                     --inputs
  4286.                        TA_credentials     Credentials
  4287.                        Try_Hard           Boolean,
  4288.                        Target Name        Name,
  4289.                                                     --outputs
  4290.                        Pub_keys           Set of Public key/UID pairs
  4291.  
  4292.    This common subroutine is used in the execution of Create_Token,
  4293.    Verify_Principal_Name, and Verify_Node_Name.  Given the name of a
  4294.    principal, it retrieves a set of public key/UID pairs which
  4295.    authenticate that principal (normally only one pair).  It does this
  4296.    by retrieving from the naming service a series of certificates,
  4297.    verifying the signatures on those certificates, and verifying that
  4298.    the sequence of certificates constitute a valid "treewalk".
  4299.  
  4300.    The credentials structure passed into this procedure represent a
  4301.    starting point for the treewalk.  Included in these credentials will
  4302.    be the public key, UID, and name of an authority that is trusted to
  4303.    authenticate all remote principals (directly or indirectly).
  4304.  
  4305.    The "Try_Hard" bit is a specification anomaly resulting from the fact
  4306.    that caches maintained by this routine are not transparent to the
  4307.    calling routines.  It tells this procedure to bypass caches when
  4308.    doing all name service lookups because the information in caches is
  4309.    believed to be stale.  In general, a routine will call Get_Pub_Keys
  4310.    with Try_Hard set false and try to use the keys returned.  If use of
  4311.  
  4312.  
  4313.  
  4314. Kaufman                                                        [Page 77]
  4315.  
  4316. RFC 1507                          DASS                    September 1993
  4317.  
  4318.  
  4319.    those keys fails, the calling routine may call this routine again
  4320.    with Try_Hard set true in hopes of getting additional keys.
  4321.    Routinely calling this routine with Try_Hard set true is likely to
  4322.    have adverse performance implications but would not affect the
  4323.    correctness or the security of the operation.
  4324.  
  4325.    The name supplied is the full X.500 name of the principal for whom
  4326.    public keys are needed as part of some authentication process.
  4327.  
  4328.    This procedure securely learns the public keys and UIDs of foreign
  4329.    principals by constructing a valid chain of certificates between its
  4330.    trusted TA and the certificate naming the foreign principal.  In the
  4331.    simplest case, where the TA has signed a certificate for the foreign
  4332.    principal, the chain consists of a single certificate.  Otherwise,
  4333.    the chain must consist of a series of certificates where the first is
  4334.    signed by the TA, the last is a certificate for the foreign
  4335.    principal, and the subject of each principal in the chain is the
  4336.    issuer of the next.  What follows is first a definition of what
  4337.    constitutes a valid chain of certificates followed by a model
  4338.    algorithm which constructs all of (and only) the valid chains which
  4339.    exist between the TA and the target name.
  4340.  
  4341.    In order to limit the implications of the compromise of a single CA,
  4342.    and also to limit the complexity of the search of the certificate
  4343.    space, there are restrictions on what constitutes a valid chain of
  4344.    certificates from the TA to the Name provided.  The only CAs whose
  4345.    compromise should be able to compromise an authentication are those
  4346.    controlling directories that are ancestors of one of the two names
  4347.    and that are not above a common ancestor.  Therefore, only
  4348.    certificates signed by those CAs will be considered valid in a
  4349.    certificate chain.  Normally, the CA for a directory is expected to
  4350.    certify a public key and UID for the CA of each child directory and
  4351.    one parent directory.  A CA may also certify another CA for some
  4352.    remote part of the naming hierarchy, and such certificates are
  4353.    necessary if there are no CAs assigned to directories high in the
  4354.    naming hierarchy.
  4355.  
  4356.    A certificate chain is considered valid if it meets the following
  4357.    criteria:
  4358.  
  4359.     a) It must consist of zero or more  parent certificates, followed
  4360.        by zero or one   cross certificates, followed by zero or more
  4361.        child certificates.
  4362.  
  4363.     b) The number of parent certificates may not exceed the number of
  4364.        levels in the naming hierarchy between the TA name and the
  4365.        name of the least common ancestor in the naming hierarchy
  4366.        between the TA name and the target name.
  4367.  
  4368.  
  4369.  
  4370. Kaufman                                                        [Page 78]
  4371.  
  4372. RFC 1507                          DASS                    September 1993
  4373.  
  4374.  
  4375.     c) Each  parent certificate must be stored in the naming service
  4376.        under the entry of its issuer.
  4377.  
  4378.     d) The subject of the cross certificate (if any) must be an
  4379.        ancestor of the target name but must be a longer name than the
  4380.        least common ancestor of the TA name and the target name.
  4381.  
  4382.     e) The cross certificate (if any) must have been stored in the
  4383.        naming service under the entry of its issuer or there must
  4384.        have been an indication in the naming service that
  4385.        certificates signed by this issuer may be stored with their
  4386.        subjects.
  4387.  
  4388.     f) The issuer of each parent certificate does not have stored
  4389.        with it in the naming service a cross certificate with the
  4390.        same issuer whose subject is an ancestor of the target name.
  4391.  
  4392.     g) Each child certificate must be stored in the naming service
  4393.        under the entry of its subject.
  4394.  
  4395.     h) The subject of each child certificate does not have associated
  4396.        with it in the naming service a cross certificate with the
  4397.        same subject whose issuer is the same as the issuer of any of
  4398.        the parent certificates or the cross certificate of the chain.
  4399.  
  4400.     i) The subject of each certificate must be the issuer of the
  4401.        certificate that follows in the chain.  The equality test can
  4402.        be met by either of two methods:
  4403.  
  4404.       1) The public key of the subject in the earlier certificate
  4405.          verifies the signature of the later and the subject UID in
  4406.          the earlier certificate is equal to the issuer UID in the
  4407.          later; or
  4408.  
  4409.       2) The public key of the subject in the earlier certificate
  4410.          verifies the signature of the later, the earlier lacks a
  4411.          subject UID and/or the later lacks an issuer UID and the
  4412.          name of the subject in the earlier certificate is equal to
  4413.          the name of the issuer in the later.
  4414.  
  4415.     j) The Public Key of the TA verifies the signature of the first
  4416.        certificate.
  4417.  
  4418.     k) The UID of the TA equals the UID of the issuer of the first
  4419.        certificate  or the UID is missing on one or both places and
  4420.        the name of the TA equals the name of the issuer of the first
  4421.        certificate.
  4422.  
  4423.  
  4424.  
  4425.  
  4426. Kaufman                                                        [Page 79]
  4427.  
  4428. RFC 1507                          DASS                    September 1993
  4429.  
  4430.  
  4431.     l) All of the certificates are valid X.509 encodings and the
  4432.        current time is within all of their validity intervals.
  4433.  
  4434.    If a chain is valid, the name which it authenticates can be
  4435.    constructed as follows:
  4436.  
  4437.     a) If the chain contains a cross certificate, the name
  4438.        authenticated can be constructed by taking the subject name
  4439.        from the cross certificate and appending to it a relative name
  4440.        for each child certificate which follows.  The relative name
  4441.        is the extension by which the subject name in the child
  4442.        certificate extends the issuer name.
  4443.  
  4444.     b) If the chain does not contain a cross certificate, the name
  4445.        authenticated can be constructed by taking the TA name,
  4446.        truncating from it the last  n name components where  n is the
  4447.        number of  parent certificates in the chain, and appending to
  4448.        the result a relative name for each child certificate.  The
  4449.        relative name is the extension by which the subject name in
  4450.        the child certificate extends the issuer name.
  4451.  
  4452.    In the common case, the authenticated name will be the subject
  4453.    name in the last certificate.  The authenticated name is
  4454.    constructed by the rules above to deal with namespace
  4455.    reorganization.  If a branch of the namespace is renamed (due to,
  4456.    for example, a corporate acquisition or reorganization), only the
  4457.    certificates around the break point need to be regenerated.
  4458.    Certificates below the break will continue to contain the old
  4459.    names (until renewed), but the algorithms above assure the
  4460.    principals in that branch will be able to authenticate as their
  4461.    new names.  Further, if the certificates at the branch point are
  4462.    maintained for both the old and new names for an interim period,
  4463.    principals in the moved branch will be able to authenticate as
  4464.    either their old or new names for that interim period without
  4465.    having duplicate certificates.
  4466.  
  4467.    A final complication that the algorithm must deal with is the
  4468.    location of  cross certificates.  If a key is compromised or for
  4469.    some other reason it is important to revoke a certificate ahead
  4470.    of its expiration, it is removed from the naming service.  This
  4471.    algorithm will only use certificates that it has recently
  4472.    retrieved from the naming service, so revocation is as effective
  4473.    as the mechanisms that prevent impersonation of the naming
  4474.    service.   There are plans to eventually use DASS mechanisms to
  4475.    secure access to the naming service; until they are in place,
  4476.    name service impersonation is a theoretical threat to the
  4477.    security of revocation.  Opinions differ as to whether it is a
  4478.    practical threat.   Child certificates are always stored with the
  4479.  
  4480.  
  4481.  
  4482. Kaufman                                                        [Page 80]
  4483.  
  4484. RFC 1507                          DASS                    September 1993
  4485.  
  4486.  
  4487.    subject and will not be found unless stored in the name server of
  4488.    the subject.    Parent  certificates are always stored with the
  4489.    issuer and will not be found unless stored in the name server of
  4490.    the issuer.  For best security, cross certificates should be
  4491.    stored with the issuer because the name server for the subject
  4492.    may not be adequately trustworthy to perform revocation.  There
  4493.    are performance and availability penalties, however, in doing so.
  4494.    The architecture and the algorithm therefore support storing
  4495.    cross certificates with either the issuer or the subject.  There
  4496.    must be some sort of flag in the name service associated with the
  4497.    issuer saying whether cross certificates from that issuer are
  4498.    permitted to be stored in the subject's name service entry, and
  4499.    if that flag is set such certificates will be found and used.
  4500.  
  4501.    In order to make revocation effective, DASS must assure that
  4502.    naming service caches do not become arbitrarily stale (the
  4503.    allowed age of a cache entry is included in the sum of times with
  4504.    together make up the revocation time).  If DASS uses a naming
  4505.    service such as DNS that does not time out cache entries, it must
  4506.    bypass cache on all calls and (to achieve reasonable performance)
  4507.    maintain its own naming service cache.  It may be advantageous to
  4508.    maintain a cache in any case so the that the fact that the
  4509.    certificates have been verified can be cached as well as the fact
  4510.    that they are current.
  4511.  
  4512. 3.10.10.1 Basic Algorithm
  4513.  
  4514.    For ease of exposition, this first description will ignore the
  4515.    operation of any caches.  Permissible modifications to take
  4516.    advantage of caches and enhance performance will be covered in
  4517.    the next section.  This path will be followed if the Try_Hard bit
  4518.    is set True on the call.
  4519.  
  4520.    Rather than trying construct all possible chains between the TA
  4521.    and the name to be authenticated (in the event of multiple
  4522.    certificates per principal, there could be exponentially many
  4523.    valid chains), this algorithm computes a set of PK/UID/Name
  4524.    triples that are valid for each principal on the path between the
  4525.    TA and the name to be authenticated.  By doing so, it minimizes
  4526.    the processing of redundant information.
  4527.  
  4528.     a) Determining path and initialization
  4529.  
  4530.        Several state variables are manipulated during the tree walk.
  4531.        These are called:
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538. Kaufman                                                        [Page 81]
  4539.  
  4540. RFC 1507                          DASS                    September 1993
  4541.  
  4542.  
  4543.       1) Current-directory-name
  4544.          This is the name indicating the current place in the tree
  4545.          walk.  Initially, this is the name of the TA.
  4546.  
  4547.       2) Least-Common-Ancestor-Name
  4548.          This is the portion of the names which is common to both the
  4549.          CA and the Target.  This is computed at initialization and
  4550.          does not change during the treewalk.
  4551.  
  4552.       3) Trusted-Key-Set
  4553.          For each name which is an ancestor of either the TA or the
  4554.          Target but not of the Least-Common-Ancestor, a list of
  4555.          PK/UID/Name triples.  This is initialized to a single triple
  4556.          from the TA information in the supplied credentials.
  4557.  
  4558.       4) Search-when-descending
  4559.          This is a list of PK/UID/Name triples of issuers that will
  4560.          be trusted when descending the tree.  This set is initially
  4561.          empty.
  4562.  
  4563.       5) Saved-RDNs
  4564.          This is a sequence of Relative Distinguished Names (RDNs)
  4565.          stripped off the right of the target name to form
  4566.          Least-common-ancestor-name.  This "stack" is initially empty
  4567.          and is populated during Step 3.
  4568.  
  4569.     b) Ascending the "TA side" of the tree
  4570.  
  4571.        While Current-directory-name is not identical to
  4572.        Common-point-Name the algorithm moves up the tree. At each
  4573.        step it does the following operations.
  4574.  
  4575.       1) Find all cross certificates stored in the naming service
  4576.          under Current-directory-name in which the subject is an
  4577.          ancestor of the principal to be authenticated or an
  4578.          indication that cross certificates from this issuer are
  4579.          stored in the subject entry.  If there is an indication that
  4580.          such certificates are stored in the subject entry, copy all
  4581.          triples in Trusted-Key-Set for Current-directory-name into
  4582.          the "Search-when-descending" list.  If any such certificates
  4583.          are found, filter them to include only those which meet the
  4584.          following criteria:
  4585.  
  4586.         (i)  For some triple in the Trusted-Key-Set corresponding to
  4587.              the Current-directory-name, the public key in the triple
  4588.              verifies the signature on the certificate  and either the
  4589.              UID in the triple matches the issuer UID in the
  4590.              certificate  or the UID in the triple and/or the
  4591.  
  4592.  
  4593.  
  4594. Kaufman                                                        [Page 82]
  4595.  
  4596. RFC 1507                          DASS                    September 1993
  4597.  
  4598.  
  4599.              certificate is missing and the name in the triple matches
  4600.              the issuer name in the certificate.
  4601.  
  4602.         (ii) No certificates were found signed by this issuer in which
  4603.              the subject name is longer than the subject name in this
  4604.              certificate (i.e., if there are cross certificates to two
  4605.              different ancestors, accept only those which lead to the
  4606.              closest ancestor).
  4607.  
  4608.         (iii)The current time is within the validity interval of the
  4609.              certificate.
  4610.  
  4611.       2) If any cross certificates were found (whether or not they
  4612.          were all eliminated as part of the filtering process), set
  4613.          Current-directory-name to the longest name that was found in
  4614.          any certificate and construct a set of PK/UID/Name triples
  4615.          for that name from the certificates which pass the filter
  4616.          and place them in the Trusted Key Set associated with their
  4617.          subject.  Exit the ascending tree loop at this point and
  4618.          proceed directly to step 3.  Note that this means that if
  4619.          there are cross certificates to an ancestor of the target
  4620.          but they are all rejected (for example if they have
  4621.          expired), the treewalk will   not construct a chain through
  4622.          the least common ancestor and will ultimately fail unless a
  4623.          crosslink from a lower ancestor is found stored with its
  4624.          subject.  This is a security feature.
  4625.  
  4626.       3) If no cross certificates are found, find all the parent
  4627.          directory certificates for the directory whose name is in
  4628.          the Current-directory-name.  Filter these to find only those
  4629.          which meet the following criteria:
  4630.  
  4631.         (i)  The current time is within the validity interval.
  4632.  
  4633.         (ii) For some triple corresponding to the
  4634.              Current-directory-name, the public key in the triple
  4635.              verifies the signature on the certificate  and either  the
  4636.              UID in the triple matches the issuer UID in the
  4637.              certificate  or the UID in the triple and/or the
  4638.              certificate is missing and the name in the triple matches
  4639.              the issuer name in the certificate.
  4640.  
  4641.       4) Construct PK/UID/Name triples from the remaining
  4642.          certificates for the directory whose name is constructed by
  4643.          stripping the rightmost simple name from the
  4644.          Current-directory-name and place them in the Trusted-Key-Set.
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650. Kaufman                                                        [Page 83]
  4651.  
  4652. RFC 1507                          DASS                    September 1993
  4653.  
  4654.  
  4655.       5) Strip the rightmost simple name of the
  4656.          Current-directory-name.
  4657.  
  4658.       6) Repeat from step (a) (testing to see if
  4659.          current-directory-name is the same as Common-point-Name).
  4660.  
  4661.     c) Searching the "target side" of the tree for a crosslink:
  4662.  
  4663.       1) Initialization: set Current-directory-name to the name
  4664.          supplied as input to this procedure.
  4665.  
  4666.       2) Retrieve from the naming service all cross certificates
  4667.          associated with Current-directory-name.  Filter to only
  4668.          those that meet the following criteria:
  4669.  
  4670.         (i)  The current time is within their validity interval.
  4671.  
  4672.         (ii) The subject name is equal to Current-directory-name.
  4673.  
  4674.         (iii)For some PK/UID/Name triple in the
  4675.              "Search-when-descending" list compiled while ascending
  4676.              the tree, the Public Key verifies the signature on the
  4677.              certificate and  either the UID matches the issuer UID in
  4678.              the certificate   or a UID is missing from the triple
  4679.              and/or the certificate and the Name in the triple matches
  4680.              the issuer name in the certificate.
  4681.  
  4682.         (iv) There are no certificates found meeting criteria (ii) and
  4683.              (iii) matching a PK/UID/Name triple in the
  4684.              Search-when-descending list whose subject is a directory
  4685.              lower in the naming hierarchy.
  4686.  
  4687.       3) If any qualifying certificates are found, construct
  4688.          PK/UID/Name triples for each of them; these should replace
  4689.          rather than supplement any triples already in the
  4690.          Trusted-key-set for that directory.
  4691.  
  4692.       4) If after steps (b) and (c), there are no PK/UID/Name triples
  4693.          corresponding to Current-directory-name in Trusted-Key-Set,
  4694.          shorten Current-directory-name by one RDN (pushing it onto
  4695.          the Saved-RDNs stack) and repeat this process until
  4696.          Current-directory-name is equal to
  4697.          Least-common-ancestor-name  or there is at least one triple
  4698.          in Trusted-key-set corresponding to Current-directory-name.
  4699.  
  4700.     d) Descending the tree
  4701.  
  4702.        While the list Saved-RDNs is not Empty the algorithm moves
  4703.  
  4704.  
  4705.  
  4706. Kaufman                                                        [Page 84]
  4707.  
  4708. RFC 1507                          DASS                    September 1993
  4709.  
  4710.  
  4711.        down the tree. At each step it does the following operations.
  4712.  
  4713.       1) Remove the first RDN from Saved-RDNs and append it to the
  4714.          Current-directory-name.
  4715.  
  4716.       2) Find all the child directory certificates for the directory
  4717.          whose name is in the current-directory-name.
  4718.  
  4719.       3) Filter these certificates to find only those which meet the
  4720.          following criteria:
  4721.  
  4722.         (i)  The current time is within the validity interval.
  4723.  
  4724.         (ii) For some PK/UID/Name triple in the Current-key-set for
  4725.              the parent directory, the Public Key verifies the
  4726.              signature on the certificate and either the UID matches
  4727.              the issuer UID of the certificate   or the UID is missing
  4728.              from the triple and/or the certificate and the Name in
  4729.              the triple matches the issuer name in the certificate.
  4730.  
  4731.         (iii)The issuer name in the certificate is a prefix of the
  4732.              subject name and the difference between the two names is
  4733.              the final RDN of Current-directory-name.
  4734.  
  4735.       4) Take the key, UID, and name from each remaining certificate
  4736.          and form a new triple corresponding to
  4737.          Current-directory-name in Trusted-Key-Set. If this set is
  4738.          empty then the algorithm exits with the
  4739.          'Incomplete-chain-of-trustworthy-CAs' error condition.
  4740.  
  4741.       5) repeat from step (a), appending a new simple name to
  4742.          Current-directory-name.
  4743.  
  4744.     e) Find public keys:
  4745.        If there are no triples in the Trusted-Key-Set for the named
  4746.        principal, then the algorithm exits with the `Target-has-no-keys-w
  4747.        error condition. Otherwise, the Public Key and UID are
  4748.        extracted from each pair, duplicates are eliminated, and this
  4749.        set is returned as the Pub_keys.
  4750.  
  4751. 3.10.10.2 Allowed Variations - Caching
  4752.  
  4753.    Some use of caches can be implemented without affecting the semantics
  4754.    of the Get_Pub_Keys routine.  For example, a crypto-cache could
  4755.    remember the public key that verified a signature in the past and
  4756.    could avoid the verification operation if the same key was used to
  4757.    verify the same data structure again.  In some cases, however, it is
  4758.    impossible (or at least inconvenient) for a cache implementation to
  4759.  
  4760.  
  4761.  
  4762. Kaufman                                                        [Page 85]
  4763.  
  4764. RFC 1507                          DASS                    September 1993
  4765.  
  4766.  
  4767.    be completely transparent.
  4768.  
  4769.    In particular, for good performance it is important that certificates
  4770.    not be re-retrieved from the naming service on every authentication.
  4771.    This must be balanced against the need to have changes to the
  4772.    contents of the naming service be reflected in DASS calls on a timely
  4773.    basis.  There are two cases of interest: changes which cause an
  4774.    authentication which previously would have succeeded to fail and
  4775.    changes which cause an authentication which previously would have
  4776.    failed to succeed.  These two cases are subject to different time
  4777.    constraints.
  4778.  
  4779.    In general, changes that cause authentication to succeed must be
  4780.    reflected quite quickly - on the order of minutes.  If a user
  4781.    attempts an operation, it fails, the user tracks down a system
  4782.    manager and causes the appropriate updates to take place, and the
  4783.    user retries the operation, it is unacceptable for the operation to
  4784.    continue to fail for an extended period because of stale caches.
  4785.  
  4786.    Changes that cause authentication to fail must be reflected reliably
  4787.    within a bounded period of time for security reasons.  If a user
  4788.    leaves the company, it must be possible to revoke his ability to
  4789.    authenticate within a relatively short period of time - say hours.
  4790.  
  4791.    These constraints mean that a naming service cache which contains
  4792.    arbitrarily old information is unacceptable.  To meet the second
  4793.    constraint, naming service cache entries must be timed out within a
  4794.    reasonable period of time unless in implementation verifies that the
  4795.    certificate is still present (a crypto-cache which lasted longer
  4796.    would be legal; rather than deleting a name service cache entry, in
  4797.    implementation might instead verify that the entry was still present
  4798.    in the naming service.  This would avoid repeating the cryptographic
  4799.    "verify").
  4800.  
  4801.    In order to assure that information cached for even a few hours not
  4802.    deny authentication for that extended period, it must be possible to
  4803.    bypass caches when the result would otherwise be a failure.  Since
  4804.    the performance of authentication failures is not a serious concern,
  4805.    it is acceptable to expect that before an operation fails a retry
  4806.    will be made to the naming service to see if there are any new
  4807.    relevant certificates (or in certain obscure conditions, to see if
  4808.    any relevant certificates have been deleted).
  4809.  
  4810.    If on a call to Get_Pub_Keys, the Try_Hard bit is True, then this
  4811.    procedure must return results based on the contents of the naming
  4812.    service no more than five minutes previous (this would normally be
  4813.    accomplished by ignoring name service caches and making all
  4814.    operations directly to the naming service).  If the Try_Hard bit is
  4815.  
  4816.  
  4817.  
  4818. Kaufman                                                        [Page 86]
  4819.  
  4820. RFC 1507                          DASS                    September 1993
  4821.  
  4822.  
  4823.    False, this procedure may return results based on the contents of the
  4824.    naming service any time in the previous few hours, in the sense that
  4825.    it may ignore any certificate added in the previous few hours and may
  4826.    use any certificate deleted in the previous few hours.  Procedures
  4827.    which call this routine with Try_Hard set to false must be prepared
  4828.    to call it again with Try_Hard True if their operation fails possibly
  4829.    from this result.
  4830.  
  4831.    The exact timer values for "five minutes" and "a few hours" are
  4832.    expected to be implementation constants.
  4833.  
  4834.    In the envisioned implementation, the entire "ascending treewalk" is
  4835.    retrieved, verified, and its digested contents cached when a
  4836.    principal first establishes credentials.  A mechanism should be
  4837.    provided to refresh this information periodically for principals
  4838.    whose sessions might be long lived, but it would probably be
  4839.    acceptable in the unlikely event of a user's ancestor's keys changing
  4840.    to require that the user log out and log back in.  This is consistent
  4841.    with the observed behavior of existing security mechanisms.
  4842.  
  4843.    The descending treewalk, on the other hand, is expected to be
  4844.    maintained as a more conventional cache, where entries are kept in a
  4845.    fixed amount of memory with a "least recently used" replacement
  4846.    policy and a watchdog timer that assures that stale information is
  4847.    not kept indefinitely.  A call to Get_Pub_Keys with Try_Hard set
  4848.    false would first check that cache for relevant certificates and only
  4849.    if none were found there would it go out to the naming service.  If
  4850.    there were newer certificates in the naming service, they might not
  4851.    be found and an authentication might therefore fail.
  4852.  
  4853.    When Try_Hard is false, an implementation may assume that
  4854.    certificates not in the cache do not exist so long as that assumption
  4855.    does not cause an authentication to falsely succeed.  In that case,
  4856.    it may only make that assumption if the certificates have been
  4857.    verified to not exist within the revocation time (a few hours).
  4858.  
  4859. 3.11 DASSlessness Determination Functions
  4860.  
  4861.    In order to provide better interoperability with alternative
  4862.    authentication mechanisms and to provide backward compatibility with
  4863.    older (insecure) authentication mechanisms, it is sometimes important
  4864.    to be able to determine in a secure way what the appropriate
  4865.    authentication mechanism is for a particular named principal.  For
  4866.    some applications, this will be done by a local mechanism, where
  4867.    either the person creating access control information must know and
  4868.    specify the mechanism for each principal or a system administrator on
  4869.    the node must maintain a database mapping names to mechanisms.  Three
  4870.    applications come to mind where scaleability makes such mechanisms
  4871.  
  4872.  
  4873.  
  4874. Kaufman                                                        [Page 87]
  4875.  
  4876. RFC 1507                          DASS                    September 1993
  4877.  
  4878.  
  4879.    implausible:
  4880.  
  4881.     a) To transparently secure proxy-based applications (like rlogin)
  4882.        in an environment where some hosts have been upgraded to
  4883.        support DASS and some have not, a node must be willing to
  4884.        accept connections authenticated only by their network
  4885.        addresses but only if they can be assured that such nodes do
  4886.        not have DASS installed.  Access to a resource becomes secure
  4887.        without administrative action when all nodes authorized to
  4888.        access it have been upgraded.
  4889.  
  4890.        In this scenario, the server node must be able to determine
  4891.        whether the client node is DASSless in a secure fashion.
  4892.  
  4893.     b) Similarly, in a mixed environment where some servers are
  4894.        running DASS and some are not, it may be desirable for clients
  4895.        to authenticate servers if they can but it would be
  4896.        unacceptable for a client to stop being able to access a
  4897.        DASSless server once DASS is installed on the client.  In such
  4898.        a situation where server authentication is desirable but not
  4899.        essential, the client would like to determine in a secure
  4900.        fashion whether the server can accept DASS authentication.
  4901.  
  4902.     c) In a DASS/Kerberos interoperability scenario, a server may
  4903.        decide that Kerberos authentication is "good enough" for
  4904.        principals that do not have DASS credentials without
  4905.        introducing trust in on-line authorities when DASS credentials
  4906.        are available.  In parallel with case 1, we want it to be true
  4907.        that when the last principal with authority to access an
  4908.        object is upgraded to DASS, we automatically cease to trust
  4909.        PasswdEtc servers without administrative action on the part of
  4910.        the object owner.  For this purpose, the authenticator must
  4911.        learn in a secure fashion that the principal is incapable of
  4912.        DASS authentication.
  4913.  
  4914.    Reliably determining DASSlessness is optional for implementations of
  4915.    DASS and for applications.  No other capabilities of DASS rely on
  4916.    this one.
  4917.  
  4918.    The interface to the DASSlessness inquiry function is specified as a
  4919.    call independent of all others.  This capability must be exposed to
  4920.    the calling application so that a server that receives a request and
  4921.    no token can ask whether the named principal should be believed
  4922.    without a token.  It might improve performance and usability if in
  4923.    real interfaces DASSlessness were returned in addition to a bad
  4924.    status on the function that creates a token if the token is targeted
  4925.    toward a server incapable or processing it.  An application could
  4926.    then decide whether to make the request without a token (and give up
  4927.  
  4928.  
  4929.  
  4930. Kaufman                                                        [Page 88]
  4931.  
  4932. RFC 1507                          DASS                    September 1993
  4933.  
  4934.  
  4935.    server authentication) or to abort the request.
  4936.  
  4937. 3.11.1 Query DASSlessness
  4938.  
  4939.    Query_DASSlessness(
  4940.                                                       --inputs
  4941.                        verifying_credentials Credentials,
  4942.                        principal_name        Name,
  4943.                                                       --outputs
  4944.                        alternate_authentication Set of OIDs)
  4945.  
  4946.    This function uses the verifying credentials to search for an
  4947.    alternative authentication mechanism certificate for the named
  4948.    principal or for any CA on the path between the verifying credentials
  4949.    and the named principal.  Such a certificate is identical to an DASS
  4950.    X.509 certificate except that it lists a different algorithm
  4951.    identifier for the public key of the subject than that expected by
  4952.    DASS.
  4953.  
  4954.    This function is implemented identically to Get_Pub_Keys except:
  4955.  
  4956.     a) If in any set of certificates found, no valid DASS certificate
  4957.        is found and one or more certificates are found that would
  4958.        otherwise be valid except for an invalid subject public key
  4959.        OID, the OID from that certificate or certificates is returned
  4960.        and the algorithm terminates.
  4961.  
  4962.     b) On initial execution, Try_Hard=False.  If the first execution
  4963.        fails to retrieve any valid PK/UID pairs but also fails to
  4964.        find any invalid OID certificates, repeat the execution with
  4965.        Try_Hard=True.
  4966.  
  4967.     c) If the either execution finds PK/UID pairs or if neither finds
  4968.        and invalid OID certificates, fail by returning a null set.
  4969.  
  4970. 4. Certificate and message formats
  4971.  
  4972. 4.1 ASN.1 encoding
  4973.  
  4974.    Some definitions are taken from X.501 and X.509.
  4975.  
  4976.    Dass DEFINITIONS ::=
  4977.  
  4978.    BEGIN
  4979.  
  4980.    --CCITT Definitions:
  4981.  
  4982.    joint-iso-ccitt      OBJECT IDENTIFIER ::= {2}
  4983.  
  4984.  
  4985.  
  4986. Kaufman                                                        [Page 89]
  4987.  
  4988. RFC 1507                          DASS                    September 1993
  4989.  
  4990.  
  4991.    ds                   OBJECT IDENTIFIER ::= {joint-iso-ccitt 5}
  4992.    algorithm            OBJECT IDENTIFIER ::= {ds 8}
  4993.    encryptionAlgorithm  OBJECT IDENTIFIER ::= {algorithm 1}
  4994.    hashAlgorithm        OBJECT IDENTIFIER ::= {algorithm 2}
  4995.    signatureAlgorithm   OBJECT IDENTIFIER ::= {algorithm 3}
  4996.    rsa                  OBJECT IDENTIFIER ::= {encryptionAlgorithm 1}
  4997.  
  4998.    iso                  OBJECT IDENTIFIER ::= {1}
  4999.    identified-organization OBJECT IDENTIFIER ::= {iso 3}
  5000.    ecma               OBJECT IDENTIFIER ::= {identified-organization 12}
  5001.    member-company       OBJECT IDENTIFIER ::= {ecma 2}
  5002.    digital              OBJECT IDENTIFIER ::= {member-company 1011}
  5003.  
  5004.  
  5005.    --1989 OSI Implementors Workshop "Stable" Agreements
  5006.  
  5007.    oiw                OBJECT IDENTIFIER ::= {identified-organization 14}
  5008.    dssig                  OBJECT IDENTIFIER ::= {oiw 7}
  5009.    oiwAlgorithm           OBJECT IDENTIFIER ::= {dssig 2}
  5010.    oiwEncryptionAlgorithm OBJECT IDENTIFIER ::= {oiwAlgorithm 1}
  5011.    oiwHashAlgorithm       OBJECT IDENTIFIER ::= {oiwAlgorithm 2}
  5012.    oiwSignatureAlgorithm  OBJECT IDENTIFIER ::= {oiwAlgorithm 3}
  5013.    oiwMD2                 OBJECT IDENTIFIER ::= {oiwHashAlgorithm 1}
  5014.                                                   --null parameter
  5015.    oiwMD2withRSA          OBJECT IDENTIFIER ::= {oiwSignatureAlgorithm 1}
  5016.                                                   --null parameter
  5017.  
  5018.    --X.501 definitions
  5019.  
  5020.    AttributeType ::= OBJECT IDENTIFIER
  5021.    AttributeValue ::= ANY
  5022.    AttributeValueAssertion ::= SEQUENCE {AttributeType,AttributeValue}
  5023.  
  5024.    Name ::= CHOICE {       --only one for now
  5025.                    RDNSequence
  5026.                        }
  5027.    RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
  5028.    DistinguishedName ::= RDNSequence
  5029.  
  5030.    RelativeDistinguishedName ::= SET OF AttributeValueAssertion
  5031.  
  5032.    --X.509 definitions (with proposed 1992 extensions presumed)
  5033.  
  5034.    ENCRYPTED MACRO ::=
  5035.    BEGIN
  5036.    TYPE NOTATION   ::= type(ToBeEnciphered)
  5037.    VALUE NOTATION  ::= value(VALUE BIT STRING)
  5038.    END     -- of ENCRYPTED
  5039.  
  5040.  
  5041.  
  5042. Kaufman                                                        [Page 90]
  5043.  
  5044. RFC 1507                          DASS                    September 1993
  5045.  
  5046.  
  5047.    SIGNED MACRO    ::=
  5048.    BEGIN
  5049.    TYPE NOTATION   ::= type (ToBeSigned)
  5050.    VALUE NOTATION  ::= value (VALUE
  5051.    SEQUENCE{
  5052.            ToBeSigned,
  5053.            AlgorithmIdentifier,    --of the algorithm used to
  5054.                                    --generate the signature
  5055.            ENCRYPTED OCTET STRING  --where the octet string is the
  5056.                                    --result of the hashing of the
  5057.                                    --value of "ToBeSigned"
  5058.            }
  5059.                            )
  5060.    END     -- of SIGNED
  5061.  
  5062.  
  5063.    SIGNATURE MACRO ::=
  5064.    BEGIN
  5065.    TYPE NOTATION   ::= type (OfSignature)
  5066.    VALUE NOTATION  ::= value (VALUE
  5067.    SEQUENCE {
  5068.            AlgorithmIdentifier,    --of the algorithm used to compute
  5069.            ENCRYPTED OCTET STRING  -- the signature where the octet
  5070.                                    -- string is a function (e.g., a
  5071.                                    -- compressed or hashed version)
  5072.                                    -- of the value 'OfSignature',
  5073.                                    -- which may include the
  5074.                                    -- identifier of the algorithm
  5075.                                    -- used to compute the signature
  5076.            }
  5077.                            )
  5078.    END     -- of SIGNATURE
  5079.  
  5080.  
  5081.  
  5082.    Certificate ::= SIGNED SEQUENCE {
  5083.            version [0]             Version DEFAULT v1988,
  5084.            serialNumber    CertificateSerialNumber,
  5085.            signature               AlgorithmIdentifier,
  5086.            issuer          Name,
  5087.            valid           Validity,
  5088.            subject         Name,
  5089.            subjectPublicKey        SubjectPublicKeyInfo,
  5090.            issuerUID [1]   IMPLICIT UID OPTIONAL,  -- v1992
  5091.            subjectUID [2]  IMPLICIT UID OPTIONAL   -- v1992
  5092.            }
  5093.  
  5094.            --The Algorithm Identifier for both the signature field
  5095.  
  5096.  
  5097.  
  5098. Kaufman                                                        [Page 91]
  5099.  
  5100. RFC 1507                          DASS                    September 1993
  5101.  
  5102.  
  5103.            --and in the signature itself is:
  5104.            --      oiwMD2withRSA (1.3.14.7.2.3.1)
  5105.  
  5106.    Version ::= INTEGER {v1988(0), v1992(1)}
  5107.  
  5108.    CertificateSerialNumber ::= INTEGER
  5109.  
  5110.    Validity ::= SEQUENCE {
  5111.            NotBefore       UTCTime,
  5112.            NotAfter        UTCTime
  5113.            }
  5114.  
  5115.  
  5116.    AlgorithmIdentifier ::= SEQUENCE {
  5117.            algorithm       OBJECT IDENTIFIER,
  5118.            parameter       ANY DEFINED BY algorithm OPTIONAL
  5119.            }
  5120.  
  5121.    --The algorithms we support in one context or another are:
  5122.            --oiwMD2withRSA (1.3.14.7.2.3.1) with parameter NULL
  5123.            --rsa (2.5.8.1.1) with parameter keysize INTEGER which is
  5124.            --           the keysize in bits
  5125.            --decDEA (1.3.12.1001.7.1.2) with optional parameter
  5126.            --           missing
  5127.            --decDEAMAC (1.3.12.2.1011.7.3.3) with optional parameter
  5128.            --           missing
  5129.  
  5130.    SubjectPublicKeyInfo  ::=  SEQUENCE {
  5131.            algorithm       AlgorithmIdentifier,     -- rsa (2.5.8.1.1)
  5132.            subjectPublicKey        BIT STRING
  5133.                    -- the "bits" further decode into a DASS public key
  5134.            }
  5135.  
  5136.    UID ::= BIT STRING
  5137.  
  5138.    -- the following definitions are for Digital specified Algorithms
  5139.  
  5140.    cryptoAlgorithm OBJECT IDENTIFIER ::= {digital 7}
  5141.  
  5142.    decEncryptionAlgorithm  OBJECT IDENTIFIER ::= {cryptoAlgorithm 1}
  5143.    decHashAlgorithm        OBJECT IDENTIFIER ::= {cryptoAlgorithm 2}
  5144.    decSignatureAlgorithm   OBJECT IDENTIFIER ::= {cryptoAlgorithm 3}
  5145.    decDASSLessness         OBJECT IDENTIFIER ::= {cryptoAlgorithm 6}
  5146.  
  5147.    decMD2withRSA   OBJECT IDENTIFIER ::= {decSignatureAlgorithm 1}
  5148.    decMD4withRSA   OBJECT IDENTIFIER ::= {decSignatureAlgorithm 2}
  5149.    decDEAMAC       OBJECT IDENTIFIER ::= {decSignatureAlgorithm 3}
  5150.  
  5151.  
  5152.  
  5153.  
  5154. Kaufman                                                        [Page 92]
  5155.  
  5156. RFC 1507                          DASS                    September 1993
  5157.  
  5158.  
  5159.    decDEA          OBJECT IDENTIFIER ::= {decEncryptionAlgorithm 2}
  5160.    decMD2          OBJECT IDENTIFIER ::= {decHashAlgorithm 1}
  5161.    decMD4          OBJECT IDENTIFIER ::= {decHashAlgorithm 2}
  5162.  
  5163.  
  5164.    ShortPosixTime ::= INTEGER   -- number of seconds since base time
  5165.  
  5166.    LongPosixTime ::= SEQUENCE {
  5167.            INTEGER,             -- number of seconds since base time
  5168.            INTEGER              -- number of nanoseconds since second
  5169.            }
  5170.  
  5171.  
  5172.    ShortPosixValidity ::=  SEQUENCE {
  5173.            notBefore       ShortPosixTime,
  5174.            notAfter        ShortPosixTime }
  5175.  
  5176.    -- Note: Annex C of X.509 prescribes the following format for the
  5177.    -- representation of a public key, but does not give the structure
  5178.    -- a name.
  5179.  
  5180.    DASSPublicKey ::=  SEQUENCE {
  5181.            modulus         INTEGER,
  5182.            exponent        INTEGER
  5183.            }
  5184.  
  5185.    DASSPrivateKey ::= SEQUENCE {
  5186.            p       INTEGER ,                      -- prime p
  5187.            q [0]   IMPLICIT INTEGER OPTIONAL ,    -- prime q
  5188.            mod[1]  IMPLICIT INTEGER OPTIONAL,     -- modulus
  5189.            exp [2] IMPLICIT INTEGER OPTIONAL,     -- public exponent
  5190.            dp [3]  IMPLICIT INTEGER OPTIONAL ,    -- exponent mod p
  5191.            dq [4]  IMPLICIT INTEGER OPTIONAL ,    -- exponent mod q
  5192.            cr [5]  IMPLICIT INTEGER OPTIONAL ,    -- Chinese
  5193.                                               --remainder coefficient
  5194.            uid[6]  IMPLICIT UID OPTIONAL,
  5195.            more[7] IMPLICIT BIT STRING OPTIONAL   --Reserved for
  5196.                                                   --future use
  5197.            }
  5198.  
  5199.  
  5200.    LocalUserName   ::= OCTET STRING
  5201.    ChannelId               ::= OCTET STRING
  5202.    VersionNumber           ::= OCTET STRING (SIZE(3))
  5203.                            -- first octet is major version
  5204.                            -- second octet is minor version
  5205.                            -- third octet is ECO rev.
  5206.    versionZero  VersionNumber ::= '000000'H
  5207.  
  5208.  
  5209.  
  5210. Kaufman                                                        [Page 93]
  5211.  
  5212. RFC 1507                          DASS                    September 1993
  5213.  
  5214.  
  5215.    Authenticator ::= SIGNED SEQUENCE {
  5216.            type            BIT STRING,
  5217.                     -- first bit `delegation required'
  5218.                     -- second bit `Mutual Authentication Requested'
  5219.            whenSigned      LongPosixTime ,
  5220.            channelId  [3]  IMPLICIT ChannelId OPTIONAL
  5221.                    -- channel bindings are included when doing the
  5222.                    -- signature, but excluded when transmitting the
  5223.                    -- Authenticator
  5224.            }
  5225.                    -- uses decDEAMAC (1.3.12.2.1011.7.3.3)
  5226.  
  5227.  
  5228.    EncryptedKey ::= SEQUENCE {
  5229.            algorithm               AlgorithmIdentifier,
  5230.                            -- uses rsa (2.5.8.1.1)
  5231.            encryptedAuthKey        BIT STRING
  5232.                            -- as defined in section 4.4.5
  5233.            }
  5234.  
  5235.    SignatureOnEncryptedKey ::=  SIGNATURE EncryptedKey
  5236.                 -- uses oiwMD2withRSA (1.3.14.7.2.3.1)
  5237.                 -- Signature bits computed over EncryptedKey structure
  5238.  
  5239.  
  5240.    LoginTicket ::= SIGNED SEQUENCE {
  5241.            version [0]         IMPLICIT VersionNumber DEFAULT versionZero,
  5242.            validity            ShortPosixValidity ,
  5243.            subjectUID          UID ,
  5244.            delegatingPublicKey SubjectPublicKeyInfo
  5245.            }
  5246.            -- uses oiwMD2withRSA (1.3.14.7.2.3.1)
  5247.  
  5248.    Delegator ::= SEQUENCE {
  5249.            algorithm               AlgorithmIdentifier
  5250.                            -- decDEA encryption (1.3.12.1001.7.1.2)
  5251.            encryptedPrivKey        ENCRYPTED  DASSPrivateKey,
  5252.                            -- (only p is included)
  5253.            }
  5254.  
  5255.    UserClaimant ::=  SEQUENCE {
  5256.            userTicket [0]  IMPLICIT LoginTicket,
  5257.            evidence  CHOICE {
  5258.                    delegator [1]   IMPLICIT Delegator ,
  5259.                                 -- encrypted delegation private key
  5260.                                 -- under DES authenticating key
  5261.                                 -- present if delegating
  5262.                    sharedKeyTicketSignature [2]
  5263.  
  5264.  
  5265.  
  5266. Kaufman                                                        [Page 94]
  5267.  
  5268. RFC 1507                          DASS                    September 1993
  5269.  
  5270.  
  5271.                            IMPLICIT SignatureOnEncryptedKey
  5272.                                 -- present if not delegating
  5273.                    } ,
  5274.            userName [3]    IMPLICIT Name OPTIONAL
  5275.                                 -- name of user principal
  5276.            }
  5277.  
  5278.  
  5279.    EncryptedKeyandUserName ::= SEQUENCE {
  5280.            encryptedKey    EncryptedKey ,
  5281.            username                LocalUserName
  5282.            }
  5283.  
  5284.    SignatureOnEncryptedKeyandUserName ::=
  5285.            SIGNATURE EncryptedKeyandUserName
  5286.                    -- uses oiwMD2withRSA (1.3.14.7.2.3.1)
  5287.                    -- Signature bits computed over
  5288.                    -- EncryptedKeyandUserName structure
  5289.                    -- using node private key
  5290.            }
  5291.  
  5292.    NodeClaimant ::= SEQUENCE {
  5293.            nodeTicket Signature[0] IMPLICIT
  5294.                    SignatureOnEncryptedKeyandUserName,
  5295.            nodeName  [1]   IMPLICIT Name OPTIONAL,
  5296.            username  [2]   IMPLICIT LocalUserName OPTIONAL
  5297.            }
  5298.  
  5299.    AuthenticationToken ::= SEQUENCE {
  5300.            version [0]    IMPLICIT VersionNumber DEFAULT versionZero,
  5301.            authenticator [1]       IMPLICIT Authenticator ,
  5302.            encryptedKey  [2]       IMPLICIT EncryptedKey OPTIONAL ,
  5303.                     -- required if initiating token
  5304.            userclaimant  [3]       IMPLICIT UserClaimant OPTIONAL ,
  5305.                     -- missing if only doing node authentication
  5306.                     -- required if not doing node authentication
  5307.            nodeclaimant [4]        IMPLICIT NodeClaimant OPTIONAL
  5308.                     -- missing if only doing principal authentication
  5309.                     -- required if not doing principal authentication
  5310.            }
  5311.  
  5312.    MutualAuthenticationToken ::= CHOICE {
  5313.            v1Response [0] IMPLICIT  OCTET STRING (SIZE(6))
  5314.                  -- Constructed as follows:  A single DES block
  5315.                  -- of eight octets is constructed from the two
  5316.                  -- integers in the timestamp.  First four bytes
  5317.                  -- are the high order integer encoded MSB
  5318.                  -- first; Last four bytes are the low order
  5319.  
  5320.  
  5321.  
  5322. Kaufman                                                        [Page 95]
  5323.  
  5324. RFC 1507                          DASS                    September 1993
  5325.  
  5326.  
  5327.                  -- integer encoded MSB first.  The block is
  5328.                  -- encrypted using the shared DES key, and
  5329.                  -- the first six bytes are the OCTET STRING.
  5330.                  -- With the [0] type and 6-byte length, the
  5331.                  -- MutualAuthenticationToken has a fixed
  5332.                  -- length of eight bytes.
  5333.            }
  5334.    END
  5335.  
  5336. 4.2 Encoding Rules
  5337.  
  5338.    Whenever a structure is to be signed it must always be constructed
  5339.    the same way. This is particularly important where a signed structure
  5340.    has to be reconstructed by the recipient before the signature is
  5341.    verified. The rules listed below are taken from X.509.
  5342.  
  5343.     - the definite form of length encoding shall be used, encoded in
  5344.       the minimum number of octets;
  5345.  
  5346.     - for string types, the constructed form of encoding shall not
  5347.       be used;
  5348.  
  5349.     - if the value of a type is its default value, it shall be
  5350.       absent;
  5351.  
  5352.     - the components of a Set type shall be encoded in ascending
  5353.       order of their tag value;
  5354.  
  5355.     - the components of a Set-of type shall be encoded in ascending
  5356.       order of their octet value;
  5357.  
  5358.     - if the value of a Boolean type is true, the encoding shall
  5359.       have its contents octet set to `FF'16;
  5360.  
  5361.     - each unused bits in the final octet of the encoding of a
  5362.       BitString value, if there are any, shall be set to zero;
  5363.  
  5364.     - the encoding of a Real type shall be such that bases 8, 10 and
  5365.       16 shall not  be used, and the binary scaling factor shall be
  5366.       zero.
  5367.  
  5368. 4.3 Version numbers and forward compatibility
  5369.  
  5370.    The LoginTicket and AuthenticationToken structures contain a
  5371.    three octet version identifier which is intended to ease
  5372.    transition to future revisions of this architecture.  The default
  5373.    value, and the value which should always be supplied by
  5374.    implementations of this version of the architecture is 0.0.0
  5375.  
  5376.  
  5377.  
  5378. Kaufman                                                        [Page 96]
  5379.  
  5380. RFC 1507                          DASS                    September 1993
  5381.  
  5382.  
  5383.    (three zero octets).  The first octet is the major version.  An
  5384.    implementation of this version of the architecture should refuse
  5385.    to process data structures where it is other than zero, because
  5386.    changing it indicates that the interpretation of some subsidiary
  5387.    data structure has changed.  The second octet is the minor
  5388.    version.  An implementation of this version of the architecture
  5389.    should ignore the value of this octet.  Some future version of
  5390.    the architecture may set a value other than zero and may specify
  5391.    some different processing of the remainder of the structure based
  5392.    on that different value.  Such a change would be backward compatible
  5393.    and interoperable.  The third octet is the ECO revision.  No
  5394.    implementation should make any processing decisions based on the
  5395.    value of that octet.  It may be logged, however, to help in
  5396.    debugging interoperability problems.
  5397.  
  5398.    In the CDC protocol, there is also a three octet version
  5399.    numbering scheme, where versions 1.0.0 and 2.0.0 have been
  5400.    defined.  Implementations should follow the same rules above and
  5401.    reject major version numbers greater than 2.
  5402.  
  5403.    ASN.1 is inherently extensible because it allows new fields to be
  5404.    added "onto the end" of existing data structures in an
  5405.    unambiguous way.  Implementations of DASS are encouraged to
  5406.    ignore any such additional fields in order to enhance backwards
  5407.    compatibility with future versions of the architecture.
  5408.    Unfortunately, commonly available ASN.1 compilers lack this
  5409.    capability, so this behavior cannot reasonably be required and
  5410.    may limit options for future extensions.
  5411.  
  5412. 4.4 Cryptographic Encoding
  5413.  
  5414.    Some of the substructures listed in the previous sections are
  5415.    specified as ENCRYPTED OCTET STRINGs containing encrypted
  5416.    information.  DASS uses the DES, RSA, and MD2 cryptosystems  Each
  5417.    of those cryptosystems specifies a function from octet string
  5418.    into another in the presence of a key (except MD2, which is
  5419.    keyless).  This section describes how to form the octet strings
  5420.    on which the DES and RSA operations are performed.
  5421.  
  5422. 4.4.1 Algorithm Independence vs. Key Parity
  5423.  
  5424.    All of the defined encodings for DASS for secret key encryption
  5425.    are based on DES.  It is intended, however, that other
  5426.    cryptosystems could be substituted without any other changes for
  5427.    formats or algorithms.  The required "form factor" for such a
  5428.    cryptosystem is that it have a 64 bit key and operate on 64 bit
  5429.    blocks (this appears to be a common form factor for a
  5430.    cryptosystem).  For this reason, DES keys are in all places
  5431.  
  5432.  
  5433.  
  5434. Kaufman                                                        [Page 97]
  5435.  
  5436. RFC 1507                          DASS                    September 1993
  5437.  
  5438.  
  5439.    treated as though they were 64 bits long rather than 56.  Only in
  5440.    the operation of the algorithm itself are eight bits of the key
  5441.    dropped and key parity bits substituted. Choosing a key always
  5442.    involves picking a 64 bit random number.
  5443.  
  5444. 4.4.2 Password Hashing
  5445.  
  5446.    Encrypted credentials are encrypted using DES as described in the
  5447.    next section.  The key for that encryption is derived from the
  5448.    user's password and name by the following algorithm:
  5449.  
  5450.     a) Put the rightmost RDN of the user's name in canonical form
  5451.        according to BER and the X.509 encoding rules.  For any string
  5452.        types that are case insensitive, map to upper case, and where
  5453.        matching is independent of number of spaces collapse all
  5454.        multiple spaces to a single space and delete leading and
  5455.        trailing spaces.
  5456.  
  5457.        Note:  the RDN is used to add "salt" to the hash calculation
  5458.        so that someone can't precompute the hash of all the words in
  5459.        a dictionary and then apply them against all names.  Deriving
  5460.        the salt from the last RDN of the name is a compromise.  If it
  5461.        were derived from the whole name, all encrypted keys would be
  5462.        obsoleted when a branch of the namespace was renamed.  If it
  5463.        were independent of name, interaction with a login agent would
  5464.        take two extra messages to retrieve the salt.  With this
  5465.        scheme, encrypted keys are obsoleted by a change in the last
  5466.        RDN and if a final RDN is common to a large number of users,
  5467.        dictionary attacks against them are easier; but the common
  5468.        case works as desired.
  5469.  
  5470.     b) Compute TEMP as the MD2 message digest of the concatenation of
  5471.        the password and the RDN computed above.
  5472.  
  5473.     c) Repeat the following 40 times:  Use the first 64 bits of TEMP
  5474.        as a DES key to encrypt the second 64 bits;  XOR the result
  5475.        with the first 64 bits of TEMP; and compute a new TEMP as MD2
  5476.        of the 128 bit result.
  5477.  
  5478.     d) Use the final 64 bits of the result (called hash1) as the key
  5479.        to decrypt the encrypted credentials.  Use the first 64 bits
  5480.        (called hash2) as the proof of knowledge of the password for
  5481.        presentation to a login agent (if any).
  5482.  
  5483.  
  5484.  
  5485.  
  5486.  
  5487.  
  5488.  
  5489.  
  5490. Kaufman                                                        [Page 98]
  5491.  
  5492. RFC 1507                          DASS                    September 1993
  5493.  
  5494.  
  5495. 4.4.3 Digital DEA encryption
  5496.  
  5497.    DES encryption is used in the following places:
  5498.  
  5499.     - In the encryption of the encrypted credentials structure
  5500.  
  5501.     - To encrypt the delegator in authentication tokens
  5502.  
  5503.     - To encrypt the time in the mutual authenticator
  5504.  
  5505.    In the first two cases, a varying length block of information
  5506.    coded in ASN.1 is encrypted.  This is done by dividing the block
  5507.    of information into 8 octet blocks, padding the last block with
  5508.    zero bytes if necessary, and encrypting the result using the CBC
  5509.    mode of DES.  A zero IV is used.
  5510.  
  5511.    In the third case, a fixed length (8 byte) quantity (a timestamp)
  5512.    is encrypted.  The timestamp is mapped to a byte string using
  5513.    "big endian" order and the block is encrypted using the ECB mode
  5514.    of DES.
  5515.  
  5516. 4.4.4  Digital MAC Signing
  5517.  
  5518.    DES signing is used in the Authenticator.  Here, the signature is
  5519.    computed over an ASN.1 structure.  The signature is the CBC residue
  5520.    of the structure padded to a multiple of eight bytes with zeros.  The
  5521.    CBC is computed with an IV of zero.
  5522.  
  5523. 4.4.5 RSA Encryption
  5524.  
  5525.    RSA encryption is used in the Encrypted Shared Key.  RSA encryption
  5526.    is best thought of as operating on blocks which are integers rather
  5527.    than octet strings and the results are also integers.  Because an RSA
  5528.    encryption permutes the integers between zero and (modulus-1), it is
  5529.    generally thought of as acting on a block of size (keysizeinbits-1)
  5530.    and producing a block of size (keysizeinbits) where keysizeinbits is
  5531.    the smallest number of bits in which the modulus can be represented.
  5532.  
  5533.    DASS only supports key sizes which are a multiple of eight bits (This
  5534.    restriction is only required to support interoperation with certain
  5535.    existing implementations.  If the key size is not a multiple of eight
  5536.    bits, the high order byte may not be able to hold values as large as
  5537.    the mandated '64'.  This is not a problem so long as the two high
  5538.    order bytes together are non-zero, but certain early implementations
  5539.    check for the value '64' and will not interoperate with
  5540.    implementations that use some other value.).
  5541.  
  5542.    The encrypted shared key structure is laid out as follows:
  5543.  
  5544.  
  5545.  
  5546. Kaufman                                                        [Page 99]
  5547.  
  5548. RFC 1507                          DASS                    September 1993
  5549.  
  5550.  
  5551.     - The DES key to be shared is placed in the last eight bytes
  5552.  
  5553.     - The POSIX format creation time encoded in four bytes using big
  5554.       endian byte order is placed in the next four (from the end)
  5555.       bytes
  5556.  
  5557.     - The POSIX format expiration time encoded in four bytes using
  5558.       big endian byte order is placed in the next four (from the
  5559.       end) bytes
  5560.  
  5561.     - Four zero bytes are placed in the next four (from the end)
  5562.       bytes
  5563.  
  5564.     - The first byte contains the constant '64' (decimal)
  5565.  
  5566.     - All remaining bytes are filled with random bytes (the security
  5567.       of the system does not depend on the cryptographic randomness
  5568.       of these bytes, but they should not be a frequently repeating
  5569.       or predictable value.  Repeating the DES key from the last
  5570.       bytes would be good).
  5571.  
  5572.    The RSA algorithm is applied to the integer formed by treating the
  5573.    bytes above as an integer in big endian order and the resulting
  5574.    integer is converted to a BIT STRING by laying out the integer in
  5575.    'big endian' order.
  5576.  
  5577.    On decryption, the process is reversed; the decryptor should verify
  5578.    the four explicitly zero bytes but should not verify the contents of
  5579.    the high order byte or the random bytes.
  5580.  
  5581. 4.4.6 oiwMD2withRSA Signatures
  5582.  
  5583.    RSA-MD2 signatures are used on certificates, login tickets, shared
  5584.    key tickets, and node tickets.  In all cases, a signature is computed
  5585.    on an ASN.1 encoded string using an RSA private key.  This is done as
  5586.    follows:
  5587.  
  5588.     - The MD2 algorithm is applied to the ASN.1 encoded string to
  5589.       produce a 128 bit message digest
  5590.  
  5591.     - The message digest is placed in the low order bytes of the RSA
  5592.       block (big endian)
  5593.  
  5594.     - The next two lowest order bytes are the ASN.1 'T' and 'L' for
  5595.       an OCTET STRING.
  5596.  
  5597.     - The remainder of the RSA block is filled with zeros
  5598.  
  5599.  
  5600.  
  5601.  
  5602. Kaufman                                                       [Page 100]
  5603.  
  5604. RFC 1507                          DASS                    September 1993
  5605.  
  5606.  
  5607.     - The RSA operation is performed, and the resulting integer is
  5608.       converted to an octet string by laying out the bytes in big
  5609.       endian order.
  5610.  
  5611.    On verification, a value like the above  or one where the message
  5612.    digest is present but the 'T' and 'L' are missing (zero) should be
  5613.    accepted for backwards compatibility with an earlier definition of
  5614.    this crypto algorithm.
  5615.  
  5616. 4.4.7 decMD2withRSA Signatures
  5617.  
  5618.    This algorithm is the same as the oiwMD2withRSA algorithm as defined
  5619.    above.  We allocated an algorithm object identifier from the Digital
  5620.    space in case the definition of that OID should change.  It will not
  5621.    be used unless the meaning of oiwMD2withRSA becomes unstable.
  5622.  
  5623. Annex A
  5624.  
  5625. Typical Usage
  5626.  
  5627.    This annex describes one way a system could use DASS services (as
  5628.    described in section 3) to provide security services.  While this
  5629.    example provided motivation for some of the properties of DASS, it is
  5630.    not intended to represent the only way that DASS may be used.  This
  5631.    goes through the steps that would be needed to install DASS "from
  5632.    scratch".
  5633.  
  5634. A.1 Creating a CA
  5635.  
  5636.    A CA is created by initializing its state. Each CA can sign
  5637.    certificates that will be placed in some directory in the name
  5638.    service. Before these certificates will be believed in a wider
  5639.    context than the sub-tree of the name space which is headed by that
  5640.    directory, the CA must be certified by a CA for the parent directory.
  5641.    The procedure below accomplishes this. For most secure operation, the
  5642.    CA should run on an off-line system and communicate with the rest of
  5643.    the network by interchanging files using a simple specialized
  5644.    mechanism such as an RS232 line or a floppy disk. It is assumed that
  5645.    access to the CA is controlled and that the CA will accept
  5646.    instructions from an operator.
  5647.  
  5648.     - Call Install_CA to create the CA State.
  5649.       This state is saved within the CA system and is never
  5650.       disclosed.
  5651.  
  5652.     - If this is the first CA in the namespace and the CA is
  5653.       intended to certify only members of a single directory, we are
  5654.       done.  Otherwise, the new CA must be linked into the CA
  5655.  
  5656.  
  5657.  
  5658. Kaufman                                                       [Page 101]
  5659.  
  5660. RFC 1507                          DASS                    September 1993
  5661.  
  5662.  
  5663.       hierarchy by cross-certifying the parent and children of this
  5664.       CA.  There is no requirement that CA hierarchies be created
  5665.       from the root down, but to simplify exposition, only this case
  5666.       will be described.  The newly created CA must learn its name,
  5667.       its UID, the UID of its parent directory, and the public key
  5668.       of the parent directory CA by some out of band reliable means.
  5669.       Most likely, this would be done by looking up the information
  5670.       in the naming service and asking the CA operator to verify it.
  5671.       The CA then forms this information into a   parent certificate
  5672.       and signs it using the Create_certificate function.  It
  5673.       communicates the certificate to the network and posts it in
  5674.       the naming service.
  5675.  
  5676.     - This name, UID, and public key of the new CA are taken to the
  5677.       CA of the parent directory, which verifies it (again by some
  5678.       unspecified out-of-band mechanism) and calls
  5679.       Create_Certificate to create a child  certificate using its own
  5680.       Name and UID in the issuer fields. This certificate is also
  5681.       placed in the naming service.
  5682.  
  5683.    A CA can sign certificates for more than one directory. In this case
  5684.    it is possible that a single CA will take the role of both CAs in the
  5685.    example above. The above procedure can be simplified in this case, as
  5686.    no interchange of information is required.
  5687.  
  5688. A.2 Creating a User Principal
  5689.  
  5690.    A system manager may create a new user principal by invoking the
  5691.    Create_principal function supplying the principal's name, UID, and
  5692.    the public key/UID of the parent CA.  The public key and UID must be
  5693.    obtained in a reliable out of band manner.  This is probably by
  5694.    having knowledge of that information "wired into" the utility which
  5695.    creates new principals.  At account creation time, the system manager
  5696.    must supply what will become the user's password.  This might be done
  5697.    by having the user present and directly enter a password or by having
  5698.    the password selected by some random generator.
  5699.  
  5700.    The trusted authority certificate and corresponding user public key
  5701.    generated by the Create_principal function are sent to the CA which
  5702.    verifies its contents (again by an out-of-band mechanism) and signs a
  5703.    corresponding certificate.  The encrypted credentials, CA signed
  5704.    certificate, and trusted authority certificates are all placed in the
  5705.    naming service.  The process by which the password is made known to
  5706.    the user must be protected by some out-of-band mechanism.
  5707.  
  5708.    In some cases the principal may wish to generate its own key, and not
  5709.    use the Encrypted_Credentials. (e.g., if the Principal is represented
  5710.    by a Smart Card). This may be done using a procedure similar to the
  5711.  
  5712.  
  5713.  
  5714. Kaufman                                                       [Page 102]
  5715.  
  5716. RFC 1507                          DASS                    September 1993
  5717.  
  5718.  
  5719.    one for creating a new CA.
  5720.  
  5721. A.3 Creating a Server Principal
  5722.  
  5723.    A server also has a public/private key pair. Conceptually, the same
  5724.    procedure used to create a user principal can be used to create a
  5725.    server.  In practice, the most important difference  is likely to be
  5726.    how the password is protected when installing it on a server compared
  5727.    to giving it to a user.
  5728.  
  5729.    A server may wish to retrieve (and store) its Encrypted Credentials
  5730.    directly and never have them placed in the naming service. In this
  5731.    case some other mechanism can be used (e.g., passing the floppy disk
  5732.    containing the encrypted credentials to the server). This would
  5733.    require a variant of the Initialize_Server routine which does not
  5734.    fetch the Encrypted Credentials from the naming service.
  5735.  
  5736. A.4 Booting a Server Principal
  5737.  
  5738.    When the server first boots it needs its name (unreliably) and
  5739.    password (reliably). It then calls Initialize_Server to obtain its
  5740.    credentials and trusted authority certificates (which it will later
  5741.    need in order to authenticate users).  These credentials never time
  5742.    out, and are expected to be saved for a long time.  In particular the
  5743.    associated Incoming Timestamp List must be preserved while there are
  5744.    any timestamps on it. It is desirable to preserve the Cached Incoming
  5745.    Contexts as long as there are any contexts likely to be reused.
  5746.  
  5747.    If a server wants to initiate associations on its own behalf then it
  5748.    must call Generate_Server_Ticket.  It must repeat this at intervals
  5749.    if the expiration period expires.
  5750.  
  5751.    A node that wishes to do node authentication (or which acts as a
  5752.    server under its own name) must be created as a server.
  5753.  
  5754. A.5 A user logs on to the network
  5755.  
  5756.    The system that the user logs onto finds the user's name and
  5757.    password. It then calls Network_Login to obtain credentials for the
  5758.    user. These credentials are saved until the user wants to make a
  5759.    network connection. The credentials have a time limit, so the user
  5760.    will have to obtain new credentials in order to make connections
  5761.    after the time limit. The credentials are then checked by calling
  5762.    Verify_Principal_Name, in order to check that the key specified in
  5763.    the encrypted credentials has been certified by the CA.
  5764.  
  5765.    If the system does source node authentication it will call
  5766.    Combine_credentials, once the local username has been found.  (This
  5767.  
  5768.  
  5769.  
  5770. Kaufman                                                       [Page 103]
  5771.  
  5772. RFC 1507                          DASS                    September 1993
  5773.  
  5774.  
  5775.    can either be found by looking the principal's global name up in a
  5776.    file, or the user can be asked to give the local name directly.
  5777.    Alternatively the user can be asked to give his local username, which
  5778.    the system looks up to find the global name).
  5779.  
  5780. A.6 An Rlogin (TCP/IP) connection is made
  5781.  
  5782.    When the user calls a modified version of the rlogin utility, it
  5783.    calls Create_token in order to create the Initial Authentication
  5784.    Token, which is passed to the other system as part of the rlogin
  5785.    protocol.  The rlogind utility at the destination node calls
  5786.    Accept_token to verify it.  It then looks up in a local rhosts-like
  5787.    database to determine whether this global user is allowed access to
  5788.    the requested destination account.  It calls Verify_principal_name
  5789.    and/or Verify_node_name to confirm the identity of the requester.  If
  5790.    access is allowed, the connection is accepted and the Mutual
  5791.    Authentication Token is returned in the response message.
  5792.  
  5793.    The source receives the returned Mutual Authentication Token and uses
  5794.    it to confirm it communicating with the correct destination node.
  5795.  
  5796.    Rlogind then calls Combine_credentials to combine its node/account
  5797.    information with the global user identification in the received
  5798.    credentials in case the user accesses any network resources from the
  5799.    destination system.
  5800.  
  5801. A.7 A Transport-Independent Connection
  5802.  
  5803.    As an alternative to the description in A.6, an application wishing
  5804.    to be portable between different underlying transports may call
  5805.    create_token to create an authentication token which it then sends to
  5806.    its peer.  The peer can then call accept_token and
  5807.    verify_principal_name and learn the identity of the requester.
  5808.  
  5809. Annex B
  5810.  
  5811. Support of the GSSAPI
  5812.  
  5813.    In order to support applications which need to be portable across a
  5814.    variety of underlying security mechanisms, a "Generic Security
  5815.    Service API" (or GSSAPI) was designed which gives access to a common
  5816.    core of security services expected to be provided by several
  5817.    mechanisms.  The GSSAPI was designed with DASS, Kerberos V4, and
  5818.    Kerberos V5 in mind, and could be written as a front end to any or
  5819.    all of those systems.  It is hoped that it could serve as an
  5820.    interface to other security systems as well.
  5821.  
  5822.    Application portability requires that the security services supported
  5823.  
  5824.  
  5825.  
  5826. Kaufman                                                       [Page 104]
  5827.  
  5828. RFC 1507                          DASS                    September 1993
  5829.  
  5830.  
  5831.    be comparable.  Applications using the GSSAPI will not be able to
  5832.    access all of the features of the underlying security mechanisms.
  5833.    For example, the GSSAPI does not allow access to the "node
  5834.    authentication" features of DASS.  To the extent the underlying
  5835.    security mechanisms do not support all the features of GSSAPI,
  5836.    applications using those features will not be portable to those
  5837.    security mechanisms.  For example, Kerberos V4 does not support
  5838.    delegation, so applications using that feature of the GSSAPI will not
  5839.    be portable to Kerberos V4.
  5840.  
  5841.    This annex explains how the GSSAPI can be implemented using the
  5842.    primitive services provided by DASS.
  5843.  
  5844. B.1 Summary of GSSAPI
  5845.  
  5846.    The latest draft of the GSSAPI specification is available as an
  5847.    internet draft.  The following is a brief summary of that evolving
  5848.    document and should not be taken as definitive.  Included here are
  5849.    only those aspects of GSSAPI whose implementation would be DASS
  5850.    specific.
  5851.  
  5852.    The GSSAPI provides four classes of functions: Credential Management,
  5853.    Context-Level Calls, Per-message calls, and Support Calls; two types
  5854.    of objects: Credentials and Contexts; and two kinds of data
  5855.    structures to be transmitted as opaque byte strings: Tokens and
  5856.    Messages. Credentials hold keys and support information used in
  5857.    creating tokens.  Contexts hold keys and support information used in
  5858.    signing and encrypting messages.
  5859.  
  5860.    The Credential Management functions of GSSAPI are "incomplete" in the
  5861.    sense that one could not build a useful security implementation using
  5862.    only GSSAPI.  Functions which create credentials based on passwords
  5863.    or smart cards are needed but not provided by GSSAPI.  It is
  5864.    envisioned that such functions would be invoked by security mechanism
  5865.    specific functions at user login or via some separate utility rather
  5866.    than from within applications intended to be portable.  The
  5867.    Credential Management functions available to portable applications
  5868.    are:
  5869.  
  5870.     - GSS_Acquire_cred:  get a handle to an existing credential
  5871.       structure based on a name or process default.
  5872.  
  5873.     - GSS_Release_cred:  release credentials after use.
  5874.  
  5875.    The Context-Level Calls use credentials to establish contexts.
  5876.    Contexts are like connections: they are created in pairs and are
  5877.    generally used at the two ends of a connection to process messages
  5878.    associated with that connection.  The Context-Level Calls of interest
  5879.  
  5880.  
  5881.  
  5882. Kaufman                                                       [Page 105]
  5883.  
  5884. RFC 1507                          DASS                    September 1993
  5885.  
  5886.  
  5887.    are:
  5888.  
  5889.     - GSS_Init_sec_context:  given credentials and the name of a
  5890.       destination, create a new context and a token which will
  5891.       permit the destination to create a corresponding context.
  5892.  
  5893.     - GSS_Accept_sec_context:  given credentials and an incoming
  5894.       token, create a context corresponding to the one at the
  5895.       initiating end and provide information identifying the
  5896.       initiator.
  5897.  
  5898.     - GSS_Delete_sec_context:  delete a context after use.
  5899.  
  5900.    The Per-Message Calls use contexts to sign, verify, encrypt, and
  5901.    decrypt messages between the holders of matching contexts.  The Per-
  5902.    Message Calls are:
  5903.  
  5904.     - GSS_Sign:  Given a context and a message, produces a string of
  5905.       bytes which constitute a signature on a provided message.
  5906.  
  5907.     - GSS_Verify:  Given a context, a message, and the bytes
  5908.       returned by GSS_Sign, verifies the message to be authentic
  5909.       (unaltered since it was signed by the corresponding context).
  5910.  
  5911.     - GSS_Seal:  Given a context and a message, produces a string of
  5912.       bytes which include the message and a signature; the message
  5913.       may optionally be encrypted.
  5914.  
  5915.     - GSS_Unseal:  Given a context and the string of bytes from
  5916.       GSS_Seal, returns the original message and a status indicating
  5917.       its authenticity.
  5918.  
  5919.    The Support Calls provide utilities like translating names and status
  5920.    codes into printable strings.
  5921.  
  5922. B.2 Implementation of GSSAPI over DASS
  5923.  
  5924. B.2.1 Data Structures
  5925.  
  5926.    The objects and data structures of the GSSAPI do not map neatly into
  5927.    the objects and data structures of the DASS architecture.
  5928.  
  5929.    This section describes how those data structures can be implemented
  5930.    using the DASS data structures and primitives
  5931.  
  5932.    Credential handles correspond to the credentials structures in DASS,
  5933.    where the portable API assumes that the credential structures
  5934.    themselves are kept from applications and handles are passed to and
  5935.  
  5936.  
  5937.  
  5938. Kaufman                                                       [Page 106]
  5939.  
  5940. RFC 1507                          DASS                    September 1993
  5941.  
  5942.  
  5943.    from the various subroutines.
  5944.  
  5945.    Context initialization tokens correspond to the tokens of DASS.  The
  5946.    GSSAPI prescribes a particular ASN.1 encoded form for tokens which
  5947.    includes a mechanism specific bit string within it.  An
  5948.    implementation of GSSAPI should enclose the DASS token within the
  5949.    GSSAPI "wrapper".
  5950.  
  5951.    Context handles have no corresponding structure in DASS. The
  5952.    Create_token and Accept_token calls of DASS return a shared key and
  5953.    instance identifier. An implementation of the GSSAPI must take those
  5954.    values along with some other status information and package it as a
  5955.    "context" opaque structure.  These data structures must be allocated
  5956.    and freed with the appropriate calls.
  5957.  
  5958.    Per-message tokens and sealed messages have no corresponding data
  5959.    structure within DASS.  To fully support the GSSAPI functionality,
  5960.    DASS must be extended to include this functionality.  These data
  5961.    structures are created by cryptographic routines given the keys and
  5962.    status information in context structures and the messages passed to
  5963.    them.  While not properly part of the DASS architecture, the formats
  5964.    of these data structures are included in section C.3.
  5965.  
  5966. B.2.2 Procedures
  5967.  
  5968.    This section explains how the functions of the GSSAPI can be provided
  5969.    in terms of the Services Provided by DASS.  Not all of the DASS
  5970.    features are accessible through the GSSAPI.
  5971.  
  5972. B.2.2.1 GSS_Acquire_cred
  5973.  
  5974.    The GSSAPI does not provide a mechanism for logging in users or
  5975.    establishing server credentials. It assumes that some system specific
  5976.    mechanism created those credentials and that applications need some
  5977.    mechanism for getting at them. A model implementation might save all
  5978.    credentials in a node-global pool indexed by some sort of credential
  5979.    name. The credentials in the pool would be access controlled by some
  5980.    local policy which is not concern of portable applications. Those
  5981.    applications would simply call GSS_Acquire_cred and if they passed
  5982.    the access control check, they would get a handle to the credentials
  5983.    which could be used in subsequent calls.
  5984.  
  5985. B.2.2.2 GSS_Release_cred
  5986.  
  5987.    This call corresponds to the "delete_credentials" call of DASS.
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994. Kaufman                                                       [Page 107]
  5995.  
  5996. RFC 1507                          DASS                    September 1993
  5997.  
  5998.  
  5999. B.2.2.3 GSS_Init_sec_context
  6000.  
  6001.    In the course of a normal mutual authentication, this routine will be
  6002.    called twice. The procedure can determine whether this is the first
  6003.    or second call by seeing whether the "input_context_handle" is zero
  6004.    (it will be on the first call).  On the first call, it will use the
  6005.    DASS Create_token service to create a token and it will also allocate
  6006.    and populate a "context" structure. That structure will hold the key,
  6007.    instance identifier, and mutual authentication token returned by
  6008.    Create_token and will in addition hold the flags which were passed
  6009.    into the Init_sec_context call. The token returned by
  6010.    Init_sec_context will be the DASS token included in the GSSAPI token
  6011.    "wrapper".  The DASS token will include the optional principal name.
  6012.  
  6013.    If mutual authentication is not requested in the GSSAPI call, the
  6014.    mutual authentication token returned by DASS will be ignored and the
  6015.    initial call will return a COMPLETE status. If mutual authentication
  6016.    is requested, the mutual authentication token will be stored in the
  6017.    context information and a CONTINUE_NEEDED status returned.
  6018.  
  6019.    On the second call to GSS_Init_sec_context (with input_context_handle
  6020.    non-zero), the returned token will be compared to the one in the
  6021.    context information using the Compare_mutual_token procedure and a
  6022.    COMPLETE status will be returned if they match.
  6023.  
  6024. B.2.2.4 GSS_Accept_sec_context
  6025.  
  6026.    This routine in GSSAPI accepts an incoming token and creates a
  6027.    context.  It combines the effects of a series of DASS functions.  It
  6028.    could be implemented as follows:
  6029.  
  6030.     - Remove the GSSAPI "wrapper" from the incoming token and pass
  6031.       the rest and the credentials to "Accept_token".  Accept_token
  6032.       produces a mutual authentication token and a new credentials
  6033.       structure.  If delegation was requested, the new credentials
  6034.       structure will be an output of GSS_Accept_sec_context.  In any
  6035.       case, it will be used in the subsequent steps of this
  6036.       procedure.
  6037.  
  6038.     - Use the DASS Get_principal_name function to extract the
  6039.       principal name from the credentials produced by Accept_token.
  6040.       This name is one of the outputs of "GSS_Accept_sec_context.
  6041.  
  6042.     - Apply the DASS Verify_principal_name to the new credentials
  6043.       and the retrieved name to authenticate the token as having
  6044.       come from the named principal.
  6045.  
  6046.     - Create and populate a context structure with the key and
  6047.  
  6048.  
  6049.  
  6050. Kaufman                                                       [Page 108]
  6051.  
  6052. RFC 1507                          DASS                    September 1993
  6053.  
  6054.  
  6055.       timestamp returned by Accept_token and a status of COMPLETE.
  6056.       Return a handle to that context.
  6057.  
  6058.     - If delegation was requested, return the new credentials from
  6059.       GSS_Accept_sec_context.  Otherwise, call Delete_credentials.
  6060.  
  6061.     - If mutual authentication was requested, wrap the mutual
  6062.       authentication token from Accept_token in a GSSAPI "wrapper"
  6063.       and return it.  Otherwise return a null string.
  6064.  
  6065. B.2.2.5 GSS_Delete_sec_context
  6066.  
  6067.    This routine simply deletes the context state.  No calls to DASS are
  6068.    required.
  6069.  
  6070. B.2.2.6 GSS_Sign
  6071.  
  6072.    This routine takes as input a context handle and a message. It
  6073.    creates a per_msg_token by computing a digital signature on the
  6074.    message using the key and timestamp in the context block.  No DASS
  6075.    services are required. If additional cryptographic services were
  6076.    requested (replay detection or sequencing), a timestamp or sequence
  6077.    number must be prepended to the message and sent with the signature.
  6078.    The syntax for this message is listed in section C.3.
  6079.  
  6080. B.2.2.7 GSS_Verify
  6081.  
  6082.    This routine repeats the calculation of the sign routine and verifies
  6083.    the signature provided. If replay detection or sequencing services
  6084.    are provided, the context must maintain as part of its state
  6085.    information containing the sequence numbers or timestamps of messages
  6086.    already received and this one must be checked for acceptability.
  6087.  
  6088. B.2.2.8 GSS_Seal
  6089.  
  6090.    This routine performs the same functions as Sign but also optionally
  6091.    encrypts the message for privacy using the shared key and
  6092.    encapsulates the whole thing in a GSSAPI specified ASN.1 wrapper.
  6093.  
  6094. B.2.2.9 GSS_Unseal
  6095.  
  6096.    This routine performs the same functions as GSS_Verify but also
  6097.    parses the data structure including the signature and message and
  6098.    decrypts the message if necessary.
  6099.  
  6100.  
  6101.  
  6102.  
  6103.  
  6104.  
  6105.  
  6106. Kaufman                                                       [Page 109]
  6107.  
  6108. RFC 1507                          DASS                    September 1993
  6109.  
  6110.  
  6111. B.3 Syntax
  6112.  
  6113.    The GSSAPI specification recommends the following ASN.1 encoding for
  6114.    the tokens and messages generated through the GSSAPI:
  6115.  
  6116.         --optional top-level token definitions to frame
  6117.         -- different mechanisms
  6118.  
  6119.         GSSAPI DEFINITIONS ::=
  6120.         BEGIN
  6121.  
  6122.         MechType ::= OBJECT IDENTIFIER
  6123.         -- data structure definitions
  6124.         ContextToken ::=
  6125.         -- option indication (delegation, etc.) indicated
  6126.         -- within mechanism-specific token
  6127.         [APPLICATION 0] IMPLICIT SEQUENCE {
  6128.              thisMech MechType,
  6129.              responseExpected BOOLEAN,
  6130.              innerContextToken ANY DEFINED BY MechType
  6131.                -- contents mechanism-specific
  6132.              }
  6133.  
  6134.         PerMsgToken ::=
  6135.         -- as emitted by GSS_Sign and processed by
  6136.         -- GSS_Verify
  6137.         [APPLICATION 1] IMPLICIT SEQUENCE {
  6138.              thisMech MechType,
  6139.              innerMsgToken ANY DEFINED BY MechType
  6140.                -- contents mechanism-specific
  6141.              }
  6142.         SealedMessage ::=
  6143.         -- as emitted by GSS_Seal and processed by
  6144.         -- GSS_Unseal
  6145.         [APPLICATION 2] IMPLICIT SEQUENCE {
  6146.              sealingToken PERMSGTOKEN,
  6147.              confFlag BOOLEAN,
  6148.              userData OCTET STRING
  6149.                -- encrypted if confFlag TRUE
  6150.              }
  6151.  
  6152.    The object identifier for the DASS MechType is 1.3.12.2.1011.7.5.
  6153.  
  6154.    The innerContextToken of a token is a DASS token or mutual
  6155.    authentication token.
  6156.  
  6157.    The innerMsgToken is a null string in the case where the message is
  6158.    encrypted and the token is included as part of a SealedMessage.
  6159.  
  6160.  
  6161.  
  6162. Kaufman                                                       [Page 110]
  6163.  
  6164. RFC 1507                          DASS                    September 1993
  6165.  
  6166.  
  6167.    Otherwise, it is an eight octet sequence computed as the CBC residue
  6168.    computed using a key and string of bytes defined as follows:
  6169.  
  6170.     - Pad the message provided by the application with 1-8 bytes of
  6171.       pad to produce a string whose length is a multiple of 8
  6172.       octets.  Each pad byte has a value equal to the number of pad
  6173.       bytes.
  6174.  
  6175.     - Compute the key by taking the timestamp of the association
  6176.       (two four byte integers laid out in big endian order with the
  6177.       most significant integer first), complementing the high order
  6178.       bit (to avoid aliasing with mutual authenticators), and
  6179.       encrypting the block in ECB mode with the shared key of the
  6180.       association.
  6181.  
  6182.    The userData field of a SealedMessage is exactly the application
  6183.    provided byte string if confFlag=FALSE.  Otherwise, it is the
  6184.    application supplied message encrypted as follows:
  6185.  
  6186.     - Pad the message provided by the application with 1-8 bytes of
  6187.       pad to produce a string whose length = 4 (mod 8).  Each pad
  6188.       byte has a value equal to the number of pad bytes.
  6189.  
  6190.     - Append a four byte CRC32 computed over the message + pad.
  6191.  
  6192.     - Compute a key by taking the timestamp of the association (two
  6193.       four byte integers laid out in big endian order with the most
  6194.       significant integer first), complementing the high order bit
  6195.       (to avoid aliasing with mutual authenticators), and encrypting
  6196.       the block in ECB mode with the shared key of the association.
  6197.  
  6198.     - Encrypt the message + pad + CRC32 using CBC and the key
  6199.       computed in the previous step.
  6200.  
  6201.    A note of the logic behind the above:
  6202.  
  6203.     - Because the shared key of an association may be reused by many
  6204.       associations between the same pair of principals, it is
  6205.       necessary to bind the association timestamp into the messages
  6206.       somehow to prevent messages from a previous association being
  6207.       replayed into a new sequence.  The technique above of
  6208.       generating an association key accomplishes this and has a side
  6209.       benefit.  An implementation may with to keep the long term
  6210.       keys out of the hands of applications for purposes of
  6211.       confinement but may wish to put the encryption associated with
  6212.       an association in process context for reasons of performance.
  6213.       Defining an association key makes that possible.
  6214.  
  6215.  
  6216.  
  6217.  
  6218. Kaufman                                                       [Page 111]
  6219.  
  6220. RFC 1507                          DASS                    September 1993
  6221.  
  6222.  
  6223.     - The reason that the association specific key is not specified
  6224.       as the output of Create_token and Accept_token is that the DCE
  6225.       RPC security implementation requires that a series of
  6226.       associations between two principals always have the same key
  6227.       and we did not want to have to support a different interface
  6228.       in that application.
  6229.  
  6230.     - The CRC32 after pad constitutes a cheap integrity check when
  6231.       data is encrypted.
  6232.     - The fact that padding is done differently for encrypted and
  6233.       signed messages means that there are no threats related to
  6234.       sending the same message encrypted and unencrypted and using
  6235.       the last block of the encrypted message as a signature on the
  6236.       unencrypted one.
  6237.  
  6238. Annex C
  6239.  
  6240. Imported ASN.1 definitions
  6241.  
  6242.    This annex contains extracts from the ASN.1 description of X.509 and
  6243.    X.500 definitions referenced by the DASS ASN.1 definitions.
  6244.  
  6245.    CCITT DEFINITIONS ::=
  6246.  
  6247.    BEGIN joint-iso-ccitt          OBJECT IDENTIFIER ::= {2} ds
  6248.    OBJECT IDENTIFIER ::= {joint-iso-ccitt 5} algorithm
  6249.    OBJECT IDENTIFIER ::= {ds 8}
  6250.  
  6251.    iso                      OBJECT IDENTIFIER ::= {1} identified-
  6252.    organization  OBJECT IDENTIFIER ::= {iso 3} ecma            OBJECT
  6253.    IDENTIFIER ::= {identified-organization 12} digital
  6254.    OBJECT IDENTIFIER ::= { ecma 1011 }
  6255.  
  6256.    -- X.501 definitions
  6257.  
  6258.    AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY
  6259.            -- useful ones are
  6260.                    --      OCTET STRING ,
  6261.                    --      PrintableString ,
  6262.                    --      NumericString ,
  6263.                    --      T61String ,
  6264.                    --      VisibleString
  6265.  
  6266.    AttributeValueAssertion ::= SEQUENCE {AttributeType,
  6267.                                                  AttributeValue}
  6268.  
  6269.    Name ::= CHOICE {-- only one possibility for now --
  6270.                    RDNSequence}
  6271.  
  6272.  
  6273.  
  6274. Kaufman                                                       [Page 112]
  6275.  
  6276. RFC 1507                          DASS                    September 1993
  6277.  
  6278.  
  6279.    RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
  6280.    DistinguishedName ::= RDNSequence
  6281.  
  6282.    RelativeDistinguishedName ::= SET OF AttributeValueAssertion
  6283.  
  6284.    -- X.509 definitions
  6285.  
  6286.    Certificate ::= SIGNED SEQUENCE {
  6287.                    version [0]             Version DEFAULT 1988 ,
  6288.                    serialNumber            SerialNumber ,
  6289.                    signature               AlgorithmIdentifier ,
  6290.                    issuer                  Name,
  6291.                    valid                   Validity,
  6292.                    subject                 Name,
  6293.                    subjectPublicKey        SubjectPublicKeyInfo }
  6294.  
  6295.    Version ::=      INTEGER { 1988(0)} SerialNumber ::= INTEGER Validity
  6296.    ::=     SEQUENCE{
  6297.            notBefore               UTCTime,
  6298.            notAfter                UTCTime}
  6299.  
  6300.    SubjectPublicKeyInfo  ::=  SEQUENCE {
  6301.            algorithm               AlgorithmIdentifier ,
  6302.            subjectPublicKey        BIT STRING
  6303.            }
  6304.  
  6305.    AlgorithmIdentifier ::= SEQUENCE {
  6306.            algorithm       OBJECT IDENTIFIER ,
  6307.                        parameters ANY DEFINED BY algorithm OPTIONAL}
  6308.  
  6309.    ALGORITHM MACRO BEGIN TYPE NOTATION   ::= "PARAMETER" type VALUE
  6310.    NOTATION  ::= value (VALUE OBJECT IDENTIFIER) END -- of ALGORITHM
  6311.  
  6312.    ENCRYPTED MACRO BEGIN TYPE NOTATION   ::=type(ToBeEnciphered) VALUE
  6313.    NOTATION  ::= value(VALUE BIT STRING)
  6314.            -- the value of the bit string is generated by
  6315.            -- taking the octets which form the complete
  6316.            -- encoding (using the ASN.1 Basic Encoding Rules)
  6317.            -- of the value of the ToBeEnciphered type and
  6318.            -- applying an encipherment procedure to those octets-- END
  6319.  
  6320.    SIGNED MACRO    ::= BEGIN TYPE NOTATION   ::= type (ToBeSigned) VALUE
  6321.    NOTATION  ::= value(VALUE SEQUENCE{
  6322.            ToBeSigned,
  6323.            AlgorithIdentifier, -- of the algorithm used to generate
  6324.                                -- the signature
  6325.            ENCRYPTED OCTET STRING
  6326.            -- where the octet string is the result
  6327.  
  6328.  
  6329.  
  6330. Kaufman                                                       [Page 113]
  6331.  
  6332. RFC 1507                          DASS                    September 1993
  6333.  
  6334.  
  6335.            -- of the hashing of the value of "ToBeSigned" END -- of
  6336.    SIGNED
  6337.  
  6338.  
  6339.    SIGNATURE MACRO ::= BEGIN TYPE NOTATION   ::= type(OfSignature) VALUE
  6340.    NOTATION  ::= value(VALUE
  6341.            SEQUENCE{
  6342.                    AlgorithmIdentifier,
  6343.                    -- of the algorithm used to compute the signature
  6344.                    ENCRYPTED OCTET STRING
  6345.                    -- where the octet string is a function (e.g., a
  6346.                    -- compressed or hashed version) of the value
  6347.                    -- "OfSignature", which may include the identifier
  6348.                    -- of the algorithm used to compute
  6349.                    -- the signature--}
  6350.                            ) END -- of SIGNATURE
  6351.  
  6352.    -- X.509 Annex H (not part of the standard)
  6353.  
  6354.    encryptionAlgorithm OBJECT IDENTIFIER ::= {algorithm 1} rsa ALGORITHM
  6355.            PARAMETER KeySize
  6356.            ::= {encryptionAlgorithm 1}
  6357.  
  6358.    KeySize ::= INTEGER
  6359.  
  6360.    END
  6361.  
  6362.  
  6363. Glossary
  6364.  
  6365.    authentication
  6366.         The process of determining the identity
  6367.         (usually the name) of the other party in some communication
  6368.         exchange.
  6369.  
  6370.    authentication context
  6371.         Cached information used during a particular instance of
  6372.         authentication and including a shared symmetric (DES) key as
  6373.         well as components of the authentication token conveyed
  6374.         during establishment of this context.
  6375.  
  6376.    authentication token
  6377.         Information conveyed during a strong authentication exchange
  6378.         that can be used to authenticate its sender. An
  6379.         authentication token can, but is not necessarily limited to,
  6380.         include the claimant identity and ticket, as well as signed
  6381.         and encrypted secret key exchange messages conveying a
  6382.         secret key to be used in future cryptographic operations. An
  6383.  
  6384.  
  6385.  
  6386. Kaufman                                                       [Page 114]
  6387.  
  6388. RFC 1507                          DASS                    September 1993
  6389.  
  6390.  
  6391.         authentication token names a particular protocol data
  6392.         structure component.
  6393.  
  6394.    authorization
  6395.         The process of determining the rights
  6396.         associated with a particular principal.
  6397.  
  6398.    certificate
  6399.         The public key of a particular principal, together
  6400.         with some other information relating to the names of the
  6401.         principal and the certifying authority, rendered unforgeable
  6402.         by encipherment with the private key of the certification
  6403.         authority that issued it.
  6404.  
  6405.    certification authority
  6406.         An authority trusted by one or more principals to create and
  6407.         assign certificates.
  6408.  
  6409.    claimant
  6410.         The party that initiates the authentication process.
  6411.         In the DASS architecture, claimants possess credentials
  6412.         which include their identity, authenticating private key and
  6413.         a ticket certifying their authenticating public key.
  6414.  
  6415.    credentials
  6416.         Information "state" required by principals in order
  6417.         to for them to authenticate.   Credentials may contain
  6418.         information used to initiate the authentication process
  6419.         (claimant information), information used to respond to an
  6420.         authentication request (verifier information), and cached
  6421.         information useful in improving performance.
  6422.  
  6423.    cryptographic checksum
  6424.         Information which is derived by performing a cryptographic
  6425.         transformation on the data unit. This information can be
  6426.         used by the receiver to verify the authenticity of data
  6427.         passed in cleartext
  6428.  
  6429.    decipher
  6430.         To reverse the effects of encipherment and render a
  6431.         message comprehensible by use of a cryptographic key.
  6432.  
  6433.    delegation
  6434.         The granting of temporary credentials that allow a
  6435.         process to act on behalf of a principal.
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442. Kaufman                                                       [Page 115]
  6443.  
  6444. RFC 1507                          DASS                    September 1993
  6445.  
  6446.  
  6447.    delegation key
  6448.         A short term public/private key pair used by a claimant
  6449.         to act on behalf of a principal for a bounded period. The
  6450.         delegation public key appears in the ticket, whereas the
  6451.         delegation private key is used to sign secret key exchange
  6452.         messages.
  6453.  
  6454.    DES
  6455.         Data Encryption Standard: a symmetric (secret key)
  6456.         encryption algorithm used by DASS. An alternate encryption
  6457.         algorithm could be substituted with little or no disruption
  6458.         to the architecture.
  6459.  
  6460.    DES key
  6461.         A 56-bit secret quantity used as a parameter to the
  6462.         DES encryption algorithm.
  6463.  
  6464.    digital signature
  6465.         A value computed from a block of data
  6466.         and a key which could only be computed by someone knowing
  6467.         the key. A digital signature computed with a secret key can
  6468.         only be verified by someone knowing that secret key.  A
  6469.         digital signature computed with a private key can be
  6470.         verified by anyone knowing the corresponding public key.
  6471.  
  6472.    encipher
  6473.         To render incomprehensible except to the holder of a
  6474.         particular key. If you encipher with a secret key, only the
  6475.         holder of the same secret can decipher the message. If you
  6476.         encipher with a public key, only the holder of the
  6477.         corresponding private key can decipher it.
  6478.  
  6479.    initial trust certificate
  6480.         A certificate signed by a principal for its own use which
  6481.         states the name and public key of a trusted authority.
  6482.  
  6483.    global user name
  6484.         A hierarchical name for a user which is
  6485.         unique within the entire domain of discussion (typically the
  6486.         network).
  6487.  
  6488.    local user name
  6489.         A simple (non-hierarchical) name by
  6490.         which a user is known within a limited context such as on a
  6491.         single computer.
  6492.  
  6493.  
  6494.  
  6495.  
  6496.  
  6497.  
  6498. Kaufman                                                       [Page 116]
  6499.  
  6500. RFC 1507                          DASS                    September 1993
  6501.  
  6502.  
  6503.    principal
  6504.         Abstract entity which can be authenticated by name.
  6505.         In DASS there are user principals and server principals.
  6506.  
  6507.    private key
  6508.         Cryptographic key used in asymmetric (public key)
  6509.         cryptography to decrypt and/or sign messages. In asymmetric
  6510.         cryptography, knowing the encryption key is independent of
  6511.         knowing the decryption key. The decryption (or signing)
  6512.         private key cannot be derived from the encrypting (or
  6513.         verifying) public key.
  6514.  
  6515.    proxy
  6516.         A mapping from an external name to a local account
  6517.         name for purposes of establishing a set of local access
  6518.         rights. Note that this differs from the definition in ECMA
  6519.         TR/46.
  6520.  
  6521.    public key
  6522.         Cryptographic key used in asymmetric cryptography to
  6523.         encrypt messages and/or verify signatures.
  6524.  
  6525.    RSA
  6526.         The Rivest-Shamir-Adelman public key cryptosystem
  6527.         based on modular exponentiation where the modulus is the
  6528.         product of two large primes.  When the term RSA key is used,
  6529.         it should be clear from context whether the public key, the
  6530.         private key, or the public/private pair is intended.
  6531.  
  6532.    secret key
  6533.         Cryptographic key used in symmetric cryptography to
  6534.         encrypt, sign, decrypt and verify messages. In symmetric
  6535.         cryptography, knowledge of the decryption key implies
  6536.         knowledge of the encryption key, and vice-versa.
  6537.  
  6538.    sign
  6539.         A process which takes a piece of data and a key and
  6540.         produces a digital signature which can only be calculated by
  6541.         someone with the key. The holder of a corresponding key can
  6542.         verify the signature.
  6543.  
  6544.    source
  6545.         The initiator of an authentication exchange.
  6546.  
  6547.    strong authentication
  6548.         Authentication by means of cryptographically derived
  6549.         authentication tokens and credentials. The actual working
  6550.         definition is closer to that of "zero knowledge" proof:
  6551.  
  6552.  
  6553.  
  6554. Kaufman                                                       [Page 117]
  6555.  
  6556. RFC 1507                          DASS                    September 1993
  6557.  
  6558.  
  6559.         authentication so as to not reveal any information usable by
  6560.         either the verifier, or by an eavesdropping third party, to
  6561.         further their potential ability to impersonate the claimant.
  6562.  
  6563.    target
  6564.         The intended second party (other than the source) to
  6565.         an authentication exchange.
  6566.  
  6567.    ticket
  6568.         A data structure certifying an authenticating
  6569.         (public) key by virtue of being signed by a user principal
  6570.         using their (long term) private key. The ticket also
  6571.         includes the UID of the principal.
  6572.  
  6573.    trusted authority
  6574.         The public key, name and UID of a
  6575.         certification authority trusted in some context to certify
  6576.         the public keys of other principals.
  6577.  
  6578.    UID
  6579.         A 128 bit unique identifier produced according to OSF
  6580.         standard specifications.
  6581.  
  6582.    user key
  6583.         A "long term" RSA key whose private portion
  6584.         authenticates its holder as having the access rights of a
  6585.         particular person.
  6586.  
  6587.    verify
  6588.         To cryptographically process a piece of data and a
  6589.         digital signature to determine that the holder of a
  6590.         particular key signed the data.
  6591.  
  6592.    verifier
  6593.         The party who will perform the operations necessary
  6594.         to verify the claimed identity of a claimant.
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610. Kaufman                                                       [Page 118]
  6611.  
  6612. RFC 1507                          DASS                    September 1993
  6613.  
  6614.  
  6615. Security Considerations
  6616.  
  6617.    Security issues are discussed throughout this memo.
  6618.  
  6619. Author's Address
  6620.  
  6621.    Charles Kaufman
  6622.    Digital Equipment Corporation
  6623.    ZKO3-3/U14
  6624.    110 Spit Brook Road
  6625.    Nashua, NH 03062
  6626.  
  6627.    Phone: (603) 881-1495
  6628.    Email: kaufman@zk3.dec.com
  6629.  
  6630.    General comments on this document should be sent to cat-ietf@mit.edu.
  6631.    Minor corrections should be sent to the author.
  6632.  
  6633.  
  6634.  
  6635.  
  6636.  
  6637.  
  6638.  
  6639.  
  6640.  
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666. Kaufman                                                       [Page 119]
  6667.